Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
springboot-maven3-centos
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
luiz.nunes
springboot-maven3-centos
Commits
41075f12
Commit
41075f12
authored
Mar 01, 2016
by
Benedikt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use openshift base image
parent
55eafc07
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
32 deletions
+11
-32
Dockerfile
Dockerfile
+9
-30
README.md
README.md
+2
-2
No files found.
Dockerfile
View file @
41075f12
...
...
@@ -3,18 +3,18 @@
# This image provide a base for running Spring Boot based applications. It
# provides a base Java 8 installation and Maven 3.
FROM
centos:
centos7
FROM
openshift/base-
centos7
# Location of the STI scripts inside the image
#
LABEL
io.openshift.s2i.scripts-url=image:///usr/libexec/s2i
# Path to be used in other layers to place s2i scripts into
ENV
STI_SCRIPTS_PATH=/usr/libexec/s2i
EXPOSE
8080
ENV
JAVA_VERSON 1.8.0
ENV
MAVEN_VERSION 3.3.9
LABEL
io.k8s.description="Platform for building and running Spring Boot applications" \
io.k8s.display-name="Spring Boot Maven 3" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,java,java8,maven,maven3,springboot"
RUN
yum update
-y
&&
\
yum install
-y
curl
&&
\
yum install
-y
java-
$JAVA_VERSON
-openjdk
java-
$JAVA_VERSON
-openjdk-devel
&&
\
...
...
@@ -28,30 +28,9 @@ ENV JAVA_HOME /usr/lib/jvm/java
ENV
MAVEN_HOME /usr/share/maven
# Add configuration files, bashrc and other tweaks
ADD
./s2i/bin/ $STI_SCRIPTS_PATH
# Create 'ruby' account we will use to run Ruby application
# Add support for '#!/usr/bin/ruby' shebang.
RUN
mkdir
-p
/opt/java/src
&&
\
groupadd
-r
java
-f
-g
433
&&
\
useradd
-u
431
-r
-g
java
-d
/opt/java
-s
/sbin/nologin
-c
"Java user"
java
&&
\
chown
-R
java:java /opt/java
COPY
./s2i/bin/ $STI_SCRIPTS_PATH
# Set the 'root' directory for this build
#
# This can be overridden inside another Dockerfile that uses this image as a base
# image or in STI via the '-e "APP_ROOT=subdir"' option.
#
# Use this in case when your application is contained in a subfolder of your
# GIT repository. The default value is the root folder.
ENV
APP_ROOT .
ENV
HOME /opt/java
ENV
PATH $HOME/bin:$PATH
WORKDIR
/opt/java/src
USER
java
EXPOSE
8080
USER
default
# Set the default CMD to print the usage of the language image
CMD
$STI_SCRIPTS_PATH/usage
README.md
View file @
41075f12
...
...
@@ -7,8 +7,8 @@ of the base image for deploying Spring Boot applications as reproducible Docker
images. The resulting images can be run either by
[
Docker
](
http://docker.io
)
or using
[
S2I
](
https://github.com/openshift/source-to-image
)
.
This image is heavily inspired by the awesome
[
openshift/
ruby-20-centos
](
https://github.com/openshift/ruby-20-centos/
)
builder image.
This image is heavily inspired by the awesome
[
openshift/
sti-ruby
](
https://github.com/openshift/sti-ruby/
)
,
builder image
s
.
Installation
---------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment