Commit 1198e91a authored by CHAMONT David's avatar CHAMONT David
Browse files

try better handling of versions

parent b2fab85d
......@@ -7,4 +7,5 @@ RUN apt-get update \
&& apt-get install -y xemacs21 \
&& rm -rf /var/lib/apt/lists/*
ADD VERSION .
ADD . /work
......@@ -7,5 +7,6 @@ RUN apt-get update \
&& apt-get install -y xemacs21 \
&& rm -rf /var/lib/apt/lists/*
ADD VERSION .
ADD . /work
3
\ No newline at end of file
#!/bin/bash
# see https://medium.com/travis-on-docker/how-to-version-your-docker-images-1d5c577ebf54
set -ex
# docker hub username
USERNAME=piscineri3
# images names
IMAGE2=python27
IMAGE3=python36
docker build -f Dockerfile2 -t $USERNAME/$IMAGE2:latest .
docker build -f Dockerfile3 -t $USERNAME/$IMAGE3:latest .
#!/bin/bash
# see https://medium.com/travis-on-docker/how-to-version-your-docker-images-1d5c577ebf54
set -ex
# docker hub username
USERNAME=piscineri3
# images names
IMAGE2=python27
IMAGE3=python36
# ensure we're up to date
git pull
# get version
version=`cat VERSION`
echo "version: $version"
# run build
./build.sh
# tag it
git add -A
git commit -m "version $version"
git tag -a "$version" -m "version $version"
git push
git push --tags
docker tag $USERNAME/$IMAGE2:latest $USERNAME/$IMAGE2:$version
docker tag $USERNAME/$IMAGE3:latest $USERNAME/$IMAGE3:$version
# push it
docker push $USERNAME/$IMAGE2:latest
docker push $USERNAME/$IMAGE2:$version
docker push $USERNAME/$IMAGE3:latest
docker push $USERNAME/$IMAGE3:$version
\ No newline at end of file
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