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
3e486bdb
Commit
3e486bdb
authored
Mar 01, 2016
by
Benedikt Ritter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add assemble and usage scripts
parent
c3164998
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
2 deletions
+66
-2
assemble
.sti/bin/assemble
+22
-0
usage
.sti/bin/usage
+10
-0
Dockerfile
Dockerfile
+34
-2
No files found.
.sti/bin/assemble
0 → 100644
View file @
3e486bdb
#!/bin/bash -e
#
# Default STI assemble script for the 'springboot-maven3-centos' image.
#
if
[
"
$1
"
=
"-h"
]
;
then
exec
/opt/java/bin/usage
fi
APP_RUNTIME_DIR
=
"
${
HOME
}
/src"
APP_SRC_DIR
=
"/tmp/src"
echo
"---> Installing application source"
mkdir
-p
${
APP_RUNTIME_DIR
}
cp
-Rf
${
APP_SRC_DIR
}
/
*
${
APP_RUNTIME_DIR
}
/
pushd
"
$APP_RUNTIME_DIR
/
${
APP_ROOT
}
"
>
/dev/null
echo
"---> Building Spring Boot application from source"
mvn clean install
popd
>
/dev/null
.sti/bin/usage
0 → 100644
View file @
3e486bdb
#!/bin/sh
cat
<<
EOF
This is a STI springboot maven3 centos base image:
To use it, install STI: https://github.com/openshift/source-to-image
Sample invocation:
sti build git://github.com/codecentric/spring-boot-sample codecentric/springboot-maven3-centos springboot-app
You can then run the resulting image via:
docker run -p 8080:8080 sinatra-app
EOF
Dockerfile
View file @
3e486bdb
...
@@ -13,10 +13,42 @@ RUN yum update -y && \
...
@@ -13,10 +13,42 @@ RUN yum update -y && \
yum install
-y
java-
$JAVA_VERSON
-openjdk
java-
$JAVA_VERSON
-openjdk-devel
&&
\
yum install
-y
java-
$JAVA_VERSON
-openjdk
java-
$JAVA_VERSON
-openjdk-devel
&&
\
yum clean all
yum clean all
ENV
JAVA_HOME /usr/lib/jvm/java
RUN
curl
-fsSL
https://archive.apache.org/dist/maven/maven-3/
$MAVEN_VERSION
/binaries/apache-maven-
$MAVEN_VERSION
-bin
.tar.gz |
tar
xzf -
-C
/usr/share
\
RUN
curl
-fsSL
https://archive.apache.org/dist/maven/maven-3/
$MAVEN_VERSION
/binaries/apache-maven-
$MAVEN_VERSION
-bin
.tar.gz |
tar
xzf -
-C
/usr/share
\
&&
mv /usr/share/apache-maven-
$MAVEN_VERSION
/usr/share/maven
\
&&
mv /usr/share/apache-maven-
$MAVEN_VERSION
/usr/share/maven
\
&&
ln
-s
/usr/share/maven/bin/mvn /usr/bin/mvn
&&
ln
-s
/usr/share/maven/bin/mvn /usr/bin/mvn
ENV
JAVA_HOME /usr/lib/jvm/java
ENV
MAVEN_HOME /usr/share/maven
ENV
MAVEN_HOME /usr/share/maven
# Add configuration files, bashrc and other tweaks
ADD
./.sti/bin/usage /opt/java/bin/
# Default STI scripts url
ENV
STI_SCRIPTS_URL https://raw.githubusercontent.com/codecentric/springboot-maven3-centos/master/.sti/bin
# Default destination of scripts and sources, this is where assemble will look for them
ENV
STI_LOCATION /tmp
# 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
# 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
CMD
["/opt/java/bin/usage"]
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