Commit 5c883353 authored by Alexandre Beelen's avatar Alexandre Beelen

Switch to DOCKER_TAG variable in order to make Docker Hub Build working

parent 84d68522
FROM debian:stretch
ARG release
ENV release=${release}
ENV release=${DOCKER_TAG}
RUN apt-get -y update && apt-get install -y \
libx11-6 \
libpng16-16 \
......
FROM debian:stretch
ARG release
ENV release=${release}
ENV release=${DOCKER_TAG}
RUN apt-get -y update && apt-get install -y \
libx11-dev \
libpng-dev \
......
FROM debian:stretch as builder
ARG release
ENV release=${release}
ENV release=${DOCKER_TAG}
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=${release}
ENV release=${DOCKER_TAG}
RUN apt-get -y update && apt-get install -y \
libx11-6 \
libpng16-16 \
......
......@@ -5,15 +5,15 @@
Build the developpement image :
```bash
export release=mar18c
docker build --tag abeelen/gildas:build --build-arg release=$release -f Dockerfile.dev .
export DOCKER_TAG=mar18c
docker build --tag abeelen/gildas:build --build-arg DOCKER_TAG=$DOCKER_TAG -f Dockerfile.dev .
```
extract the compiled files
```
docker container create --name extract abeelen/gildas:build
docker container cp extract:/gildas-exe-$release gildas-exe-$release
docker container cp extract:/gildas-exe-$DOCKER_TAG gildas-exe-$DOCKER_TAG
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-$release.tar.gz /gildas-exe-$release
abeelen/gildas:build tar cvzf $PWD/gildas-exe-$DOCKER_TAG.tar.gz /gildas-exe-$DOCKER_TAG
```
--->
Build the execution image :
```bash
docker build --tag abeelen/gildas:$release --tag abeelen/gildas:latest --build-arg release=$release -f Dockerfile .
docker build --tag abeelen/gildas:$DOCKER_TAG --tag abeelen/gildas:latest --build-arg release=$DOCKER_TAG -f Dockerfile .
```
## One stage build
......@@ -36,8 +36,8 @@ docker build --tag abeelen/gildas:$release --tag abeelen/gildas:latest --build-a
With Docker 17.05 or higher :
```bash
export release=mar18c
docker build --tag abeelen/gildas:$release --tag abeelen/gildas:latest --build-arg release=$release -f Dockerfile.multistage .
export DOCKER_TAG=mar18c
docker build --tag abeelen/gildas:$DOCKER_TAG --tag abeelen/gildas:latest --build-arg release=$DOCKER_TAG -f Dockerfile.multistage .
```
# Usage
......
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