-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added Contrast-Finder/jdk-*/alpine/Dockerfile
- Loading branch information
Showing
3 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
FROM maven:3-jdk-7-alpine | ||
MAINTAINER Fabrice Gangler <fabrice@asqatasun.org> | ||
|
||
# ########################################################## | ||
# | ||
# DISCLAIMER | ||
# | ||
# #### usage ###################################################### | ||
# | ||
# --- Building this docker image | ||
# docker build -t asqa.mvn:contrast.finder_jdk7.alpine . | ||
# docker build -t asqa.mvn:contrast.finder_jdk7.alpine --build-arg GIT_BRANCH=develop . | ||
# docker build -t asqa.mvn:contrast.finder_jdk7.alpine --build-arg GIT_BRANCH=v1.3.1 . | ||
# | ||
# --- Compiling Asqatasun-Jenkins-Plugin with this docker image | ||
# docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ asqa.mvn:contrast.finder_jdk7.alpine mvn clean install | ||
# docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ asqa.mvn:contrast.finder_jdk7.alpine mvn clean | ||
# | ||
# --- Playing with this docker image | ||
# docker run -it --rm asqa.mvn:contrast.finder_jdk7.alpine /bin/bash | ||
# docker run -it --rm asqa.mvn:contrast.finder_jdk7.alpine javac -version | ||
# docker run -it --rm asqa.mvn:contrast.finder_jdk7.alpine java -version | ||
# docker run -it --rm asqa.mvn:contrast.finder_jdk7.alpine mvn -version | ||
# | ||
# | ||
# #### source code ############################################### | ||
# https://github.com/Asqatasun/Contrast-Finder/archive/master.zip | ||
# could be overridden with --build-arg GIT_BRANCH=<branch_name> | ||
# could be overridden with --build-arg GIT_BRANCH=<tag_name> | ||
# | ||
# #### FROM ###################################################### | ||
# maven:3-jdk-7-alpine https://github.com/carlossg/docker-maven/blob/alpine/jdk-7/Dockerfile | ||
# |-- openjdk:7-jdk-alpine https://github.com/docker-library/openjdk/blob/master/7-jdk/alpine/Dockerfile | ||
# |-- alpine:3.4 https://github.com/gliderlabs/docker-alpine/blob/master/versions/library-3.4/Dockerfile | ||
################################################################### | ||
|
||
# build variables | ||
ARG GIT_BRANCH=master | ||
ARG SRC_URL_PREFIX=https://github.com/Asqatasun/Contrast-Finder/archive | ||
ARG SRC_URL="${SRC_URL_PREFIX}/${GIT_BRANCH}.zip" | ||
|
||
# build | ||
RUN cd /tmp/ && \ | ||
apk add --no-cache openssl && \ | ||
wget ${SRC_URL} && unzip *.zip && \ | ||
rm *.zip && mv Contrast-Finder* src && \ | ||
cd src && mvn clean install && \ | ||
cp -r /root/.m2 /root/.m2_backup && \ | ||
rm -rf /tmp/src /root/.m2/* && \ | ||
rm -rf /root/.m2_backup/repository/org/opens/contrast-finder && \ | ||
FIND='exec "$@"' && \ | ||
ADD='mv -f \/root\/.m2_backup\/repository \/root\/.m2\/;' && \ | ||
FILE=/usr/local/bin/mvn-entrypoint.sh && \ | ||
sed -i "s/${FIND}/${ADD}\n${FIND}/g" $FILE && \ | ||
echo "--------------------------------------------------" && \ | ||
echo "-----> backup maven plugins : OK" && \ | ||
echo "-----> clean : OK" && \ | ||
echo "-----> configuration" && cd /root/ && \ | ||
mvn -version && echo "----------------------------" && \ | ||
javac -version && echo "----------------------------" && \ | ||
java -version && echo "----------------------------" && \ | ||
echo ${SRC_URL} && echo "----------------------------" | ||
|
||
|
||
# environment variables | ||
ENV SRC_PRELOAD=${SRC_URL} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
FROM maven:3-jdk-8-alpine | ||
MAINTAINER Fabrice Gangler <fabrice@asqatasun.org> | ||
|
||
# ########################################################## | ||
# | ||
# DISCLAIMER | ||
# | ||
# #### usage ###################################################### | ||
# | ||
# --- Building this docker image | ||
# docker build -t asqa.mvn:contrast.finder_jdk8.alpine . | ||
# docker build -t asqa.mvn:contrast.finder_jdk8.alpine --build-arg GIT_BRANCH=develop . | ||
# docker build -t asqa.mvn:contrast.finder_jdk8.alpine --build-arg GIT_BRANCH=v1.3.1 . | ||
# | ||
# --- Compiling Asqatasun-Jenkins-Plugin with this docker image | ||
# docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ asqa.mvn:contrast.finder_jdk8.alpine mvn clean install | ||
# docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ asqa.mvn:contrast.finder_jdk8.alpine mvn clean | ||
# | ||
# --- Playing with this docker image | ||
# docker run -it --rm asqa.mvn:contrast.finder_jdk8.alpine /bin/bash | ||
# docker run -it --rm asqa.mvn:contrast.finder_jdk8.alpine javac -version | ||
# docker run -it --rm asqa.mvn:contrast.finder_jdk8.alpine java -version | ||
# docker run -it --rm asqa.mvn:contrast.finder_jdk8.alpine mvn -version | ||
# | ||
# | ||
# #### source code ############################################### | ||
# https://github.com/Asqatasun/Contrast-Finder/archive/master.zip | ||
# could be overridden with --build-arg GIT_BRANCH=<branch_name> | ||
# could be overridden with --build-arg GIT_BRANCH=<tag_name> | ||
# | ||
# #### FROM ###################################################### | ||
# maven:3-jdk-8-alpine https://github.com/carlossg/docker-maven/blob/alpine/jdk-8/Dockerfile | ||
# |-- openjdk:8-jdk-alpine https://github.com/docker-library/openjdk/blob/master/8-jdk/alpine/Dockerfile | ||
# |-- alpine:3.4 https://github.com/gliderlabs/docker-alpine/blob/master/versions/library-3.4/Dockerfile | ||
################################################################### | ||
|
||
# build variables | ||
ARG GIT_BRANCH=master | ||
ARG SRC_URL_PREFIX=https://github.com/Asqatasun/Contrast-Finder/archive | ||
ARG SRC_URL="${SRC_URL_PREFIX}/${GIT_BRANCH}.zip" | ||
|
||
# build | ||
RUN cd /tmp/ && \ | ||
apk add --no-cache openssl && \ | ||
wget ${SRC_URL} && unzip *.zip && \ | ||
rm *.zip && mv Contrast-Finder* src && \ | ||
cd src && mvn clean install && \ | ||
cp -r /root/.m2 /root/.m2_backup && \ | ||
rm -rf /tmp/src /root/.m2/* && \ | ||
rm -rf /root/.m2_backup/repository/org/opens/contrast-finder && \ | ||
FIND='exec "$@"' && \ | ||
ADD='mv -f \/root\/.m2_backup\/repository \/root\/.m2\/;' && \ | ||
FILE=/usr/local/bin/mvn-entrypoint.sh && \ | ||
sed -i "s/${FIND}/${ADD}\n${FIND}/g" $FILE && \ | ||
echo "--------------------------------------------------" && \ | ||
echo "-----> backup maven plugins : OK" && \ | ||
echo "-----> clean : OK" && \ | ||
echo "-----> configuration" && cd /root/ && \ | ||
mvn -version && echo "----------------------------" && \ | ||
javac -version && echo "----------------------------" && \ | ||
java -version && echo "----------------------------" && \ | ||
echo ${SRC_URL} && echo "----------------------------" | ||
|
||
|
||
# environment variables | ||
ENV SRC_PRELOAD=${SRC_URL} | ||
|
||
|
||
|