Skip to content

Commit

Permalink
added Contrast-Finder/jdk-*/alpine/Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
dzc34 committed Dec 19, 2016
1 parent abb6063 commit 7aa7a7f
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Asqa.mvn 0.6.0, 2016-12-19
--------------------------------
- added Contrast-Finder/jdk-7/Dockerfile
- added Contrast-Finder/jdk-8/Dockerfile
- added Contrast-Finder/jdk-7/alpine/Dockerfile
- added Contrast-Finder/jdk-8/alpine/Dockerfile

--------------------------------
Asqa.mvn 0.5.1, 2016-11-27
Expand Down
69 changes: 69 additions & 0 deletions Contrast-Finder/jdk-7/alpine/Dockerfile
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}



69 changes: 69 additions & 0 deletions Contrast-Finder/jdk-8/alpine/Dockerfile
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}



0 comments on commit 7aa7a7f

Please sign in to comment.