tag Docker images with the corresponding version number

This commit is contained in:
Adam Spiers 2016-11-20 22:16:10 +00:00
parent 98a8f7e3e7
commit 03480626a2
2 changed files with 12 additions and 3 deletions

View file

@ -2,6 +2,11 @@
set -eu
version=$( git describe --match v* --abbrev=0 )
imagename=stowtest
image=$imagename:$version
pushd docker
docker build -t stowtest .
echo "Building Docker image $image ..."
docker build -t $image .
popd

View file

@ -1,4 +1,8 @@
#!/bin/bash
# Run the docker image that test.
docker run --rm -it -v $(pwd):$(pwd) -w $(pwd) stowtest
# Test Stow across multiple Perl versions, by executing the
# Docker image built via build-docker.sh.
version=$( git describe --match v* --abbrev=0 )
docker run --rm -it -v $(pwd):$(pwd) -w $(pwd) stowtest:$version