Commit bee101b8 authored by Alexandre Beelen's avatar Alexandre Beelen

Try to add hook for autobuild

parent 5c883353
FROM debian:stretch
ARG release
ENV release=${DOCKER_TAG}
ENV release=${release}
RUN apt-get -y update && apt-get install -y \
libx11-6 \
libpng16-16 \
......
FROM debian:stretch
ARG release
ENV release=${DOCKER_TAG}
ENV release=${release}
RUN apt-get -y update && apt-get install -y \
libx11-dev \
libpng-dev \
......
FROM debian:stretch as builder
ARG release
ENV release=${DOCKER_TAG}
ENV release=${release}
RUN apt-get -y update && apt-get install -y \
libx11-dev \
libpng-dev \
......@@ -23,7 +23,7 @@ RUN curl http://www.iram.fr/~gildas/dist/gildas-src-$release.tar.xz | tar xJ &&
FROM debian:stretch
ARG release
ENV release=${DOCKER_TAG}
ENV release=${release}
RUN apt-get -y update && apt-get install -y \
libx11-6 \
libpng16-16 \
......@@ -38,4 +38,3 @@ RUN echo 'export GAG_ROOT_DIR=/gildas-exe-$release' >> /etc/bash.bashrc && \
echo 'export GAG_EXEC_SYSTEM=x86_64-debian9-gfortran-openmp' >> /etc/bash.bashrc && \
echo '. $GAG_ROOT_DIR/etc/bash_profile' >> /etc/bash.bashrc
COPY --from=builder /gildas-exe-$release /gildas-exe-$release
......@@ -5,15 +5,15 @@
Build the developpement image :
```bash
export DOCKER_TAG=mar18c
docker build --tag abeelen/gildas:build --build-arg DOCKER_TAG=$DOCKER_TAG -f Dockerfile.dev .
export release=mar18c
docker build --tag abeelen/gildas:build --build-arg release=$release -f Dockerfile.dev .
```
extract the compiled files
```
docker container create --name extract abeelen/gildas:build
docker container cp extract:/gildas-exe-$DOCKER_TAG gildas-exe-$DOCKER_TAG
docker container cp extract:/gildas-exe-$release gildas-exe-$release
docker container rm -f extract
```
......@@ -22,13 +22,13 @@ extract the compiled files
```
docker run -it -u $(id -u) \
-v "/home/$USER:/home/$USER" \
abeelen/gildas:build tar cvzf $PWD/gildas-exe-$DOCKER_TAG.tar.gz /gildas-exe-$DOCKER_TAG
abeelen/gildas:build tar cvzf $PWD/gildas-exe-$release.tar.gz /gildas-exe-$release
```
--->
Build the execution image :
```bash
docker build --tag abeelen/gildas:$DOCKER_TAG --tag abeelen/gildas:latest --build-arg release=$DOCKER_TAG -f Dockerfile .
docker build --tag abeelen/gildas:$release --tag abeelen/gildas:latest --build-arg release=$release -f Dockerfile .
```
## One stage build
......@@ -36,8 +36,8 @@ docker build --tag abeelen/gildas:$DOCKER_TAG --tag abeelen/gildas:latest --buil
With Docker 17.05 or higher :
```bash
export DOCKER_TAG=mar18c
docker build --tag abeelen/gildas:$DOCKER_TAG --tag abeelen/gildas:latest --build-arg release=$DOCKER_TAG -f Dockerfile.multistage .
export release=mar18c
docker build --tag abeelen/gildas:$release --tag abeelen/gildas:latest --build-arg release=$release -f Dockerfile.multistage .
```
# Usage
......
docker build --build-arg release=$DOCKER_TAG -f $DOCKERFILE_PATH -t $IMAGE_NAME .
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment