Skip to content

Commit

Permalink
Asqatasun/jdk-7/ and Asqatasun/jdk-8/
Browse files Browse the repository at this point in the history
  • Loading branch information
dzc34 committed Nov 20, 2016
1 parent cf644c9 commit be7d2b0
Show file tree
Hide file tree
Showing 3 changed files with 198 additions and 9 deletions.
58 changes: 58 additions & 0 deletions Asqatasun/jdk-7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
FROM maven:3-jdk-7
MAINTAINER Fabrice Gangler <fabrice@asqatasun.org>

# ##########################################################
#
# DISCLAIMER
#
# #### usage ######################################################
#
# --- BUILDING
# docker build -t asqa_mvn-jdk7 .
# docker build -t asqa_mvn-jdk7 --build-arg GIT_BRANCH=develop .
#
# --- TESTING
# docker run -it --rm asqa_mvn-jdk7 /bin/bash
# docker run -it --rm asqa_mvn-jdk7 javac -version
# docker run -it --rm asqa_mvn-jdk7 java -version
# docker run -it --rm asqa_mvn-jdk7 mvn -version
# docker run -it --rm asqa_mvn-jdk7 dpkg -l "openjdk*"
#
# --- COMPILING
# docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ asqa_mvn-jdk7 mvn clean install
# docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ asqa_mvn-jdk7 mvn clean
#
#
# #### source code ###############################################
# https://github.com/Asqatasun/Asqatasun/archive/master.zip
# overwriting with --build-arg GIT_BRANCH=<branch_name>
#
# #### FROM ######################################################
# maven:3-jdk-7 https://github.com/carlossg/docker-maven/blob/master/jdk-7/Dockerfile
# |--- openjdk:7-jdk https://github.com/docker-library/openjdk/blob/master/7-jdk/Dockerfile
###################################################################

# build variables
ARG SRC_URL_PREFIX=https://github.com/Asqatasun/Asqatasun/archive
ARG GIT_BRANCH=master

ENV SRC_URL="${SRC_URL_PREFIX}/${GIT_BRANCH}.zip"
RUN cd /tmp/ && \
wget ${SRC_URL} && \
unzip ${GIT_BRANCH}.zip && \
cd Asqatasun-${GIT_BRANCH} && \
mvn clean install && \
mv /root/.m2/repository /usr/share/maven/ref/repository && \
rm -rf /tmp/*.zip /tmp/Asq* /root/.m2/* && \
echo "\n\n\n" && \
echo "-----> backup maven plugins : OK" && \
echo "-----> clean : OK" && \
echo "-----> configuration" && cd /root/ && \
dpkg -l 'openjdk*'|grep ii && echo "-------------------" && \
mvn -version && echo "----------------------------" && \
javac -version && echo "----------------------------" && \
java -version && echo "----------------------------" && \
echo ${SRC_URL} && echo "----------------------------"



58 changes: 58 additions & 0 deletions Asqatasun/jdk-8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
FROM maven:3-jdk-8
MAINTAINER Fabrice Gangler <fabrice@asqatasun.org>

# ##########################################################
#
# DISCLAIMER
#
# #### usage ######################################################
#
# --- BUILDING
# docker build -t asqa_mvn-jdk8 .
# docker build -t asqa_mvn-jdk8 --build-arg GIT_BRANCH=develop .
#
# --- TESTING
# docker run -it --rm asqa_mvn-jdk8 /bin/bash
# docker run -it --rm asqa_mvn-jdk8 javac -version
# docker run -it --rm asqa_mvn-jdk8 java -version
# docker run -it --rm asqa_mvn-jdk8 mvn -version
# docker run -it --rm asqa_mvn-jdk8 dpkg -l "openjdk*"
#
# --- COMPILING
# docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ asqa_mvn-jdk8 mvn clean install
# docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ asqa_mvn-jdk8 mvn clean
#
#
# #### source code ###############################################
# https://github.com/Asqatasun/Asqatasun/archive/master.zip
# overwriting with --build-arg GIT_BRANCH=<branch_name>
#
# #### FROM ######################################################
# maven:3-jdk-8 https://github.com/carlossg/docker-maven/blob/master/jdk-8/Dockerfile
# |--- openjdk:8-jdk https://github.com/docker-library/openjdk/blob/master/8-jdk/Dockerfile
###################################################################

# build variables
ARG SRC_URL_PREFIX=https://github.com/Asqatasun/Asqatasun/archive
ARG GIT_BRANCH=master

ENV SRC_URL="${SRC_URL_PREFIX}/${GIT_BRANCH}.zip"
RUN cd /tmp/ && \
wget ${SRC_URL} && \
unzip ${GIT_BRANCH}.zip && \
cd Asqatasun-${GIT_BRANCH} && \
mvn clean install && \
mv /root/.m2/repository /usr/share/maven/ref/repository && \
rm -rf /tmp/*.zip /tmp/Asq* /root/.m2/* && \
echo "\n\n\n" && \
echo "-----> backup maven plugins : OK" && \
echo "-----> clean : OK" && \
echo "-----> configuration" && cd /root/ && \
dpkg -l 'openjdk*'|grep ii && echo "-------------------" && \
mvn -version && echo "----------------------------" && \
javac -version && echo "----------------------------" && \
java -version && echo "----------------------------" && \
echo ${SRC_URL} && echo "----------------------------"



91 changes: 82 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,99 @@
## Compilation déconnecté de l'OS via Docker

### Images Docker maven avec préchargement
@@@TODO DockerFile

#### avec Java 7 (open-jdk7 + maven)

##### builder l'image docker
```shell
git clone https://github.com/dzc34/asqatasun_docker.maven.git
cd asqatasun_docker.maven/Asqatasun/jdk-7
docker build -t asqa_mvn-jdk7 .
docker build -t asqa_mvn-jdk7 --build-arg GIT_BRANCH=develop .
```

##### Contrôler l'image
```shell
docker run -it --rm asqa_mvn-jdk7 /bin/bash
docker run -it --rm asqa_mvn-jdk7 javac -version
docker run -it --rm asqa_mvn-jdk7 java -version
docker run -it --rm asqa_mvn-jdk7 mvn -version
docker run -it --rm asqa_mvn-jdk7 dpkg -l "openjdk*"
```

##### Compiler Asqatasun
```shell
git clone https://github.com/Asqatasun/Asqatasun.git
cd Asqatasun
docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ asqa_mvn-jdk7 mvn clean install
```

##### Nettoyer les dossiers de compilation
```shell
cd Asqatasun
docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ asqa_mvn-jdk7 mvn clean
```

#### avec Java 8 (open-jdk8 + maven)

##### builder l'image docker
```shell
git clone https://github.com/dzc34/asqatasun_docker.maven.git
cd asqatasun_docker.maven/Asqatasun/jdk-8
docker build -t asqa_mvn-jdk8 .
docker build -t asqa_mvn-jdk8 --build-arg GIT_BRANCH=develop .
```

##### Contrôler l'image
```shell
docker run -it --rm asqa_mvn-jdk8 /bin/bash
docker run -it --rm asqa_mvn-jdk8 javac -version
docker run -it --rm asqa_mvn-jdk8 java -version
docker run -it --rm asqa_mvn-jdk8 mvn -version
docker run -it --rm asqa_mvn-jdk8 dpkg -l "openjdk*"
```

##### Compiler Asqatasun
```shell
git clone https://github.com/Asqatasun/Asqatasun.git
cd Asqatasun
docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ asqa_mvn-jdk8 mvn clean install
```

##### Nettoyer les dossiers de compilation
```shell
cd Asqatasun
docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ asqa_mvn-jdk8 mvn clean
```

------

### Images Docker officielles de maven

#### avec Java 7 (open-jdk7 + maven)
```shell
docker pull maven:3-jdk-7
```
##### Tester l'image en ouvrant un shell
```shell
docker run -it --rm maven:3-jdk-8 /bin/bash
```
##### Afficher la version du compilateur java
```shell
docker run -it --rm maven:3-jdk-8 javac -version
```

##### Compiler
```shell
git clone (...)
git clone https://github.com/Asqatasun/Asqatasun.git
cd Asqatasun
docker run -it --rm --name mvn-jdk7 -v "$PWD":/usr/src/asqa -w /usr/src/asqa maven:3-jdk-7 mvn clean install
docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ maven:3-jdk-7 mvn clean install
```

##### Nettoyer
##### Nettoyer les dossiers de compilation
```shell
cd Asqatasun
docker run -it --rm --name mvn-jdk7 -v "$PWD":/usr/src/asqa -w /usr/src/asqa maven:3-jdk-7 mvn clean
docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ maven:3-jdk-7 mvn clean
```

#### avec Java 8 (open-jdk8 + maven)
Expand All @@ -36,15 +109,15 @@ docker pull maven:3-jdk-8

##### Compiler
```shell
git clone (...)
git clone https://github.com/Asqatasun/Asqatasun.git
cd Asqatasun
docker run -it --rm --name mvn-jdk8 -v "$PWD":/usr/src/asqa -w /usr/src/asqa maven:3-jdk-8 mvn clean install
docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ maven:3-jdk-8 mvn clean install
```

##### Nettoyer
##### Nettoyer les dossiers de compilation
```shell
cd Asqatasun
docker run -it --rm --name mvn-jdk8 -v "$PWD":/usr/src/asqa -w /usr/src/asqa maven:3-jdk-8 mvn clean
docker run -it --rm -v "$PWD":/usr/src/ -w /usr/src/ maven:3-jdk-8 mvn clean
```

## Contact and discussions
Expand Down

0 comments on commit be7d2b0

Please sign in to comment.