Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
springboot-maven3-centos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas MENARD
springboot-maven3-centos
Commits
41075f12
Commit
41075f12
authored
9 years ago
by
Benedikt
Browse files
Options
Downloads
Patches
Plain Diff
Use openshift base image
parent
55eafc07
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+9
-30
9 additions, 30 deletions
Dockerfile
README.md
+2
-2
2 additions, 2 deletions
README.md
with
11 additions
and
32 deletions
Dockerfile
+
9
−
30
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
This diff is collapsed.
Click to expand it.
README.md
+
2
−
2
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
---------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment