Better versioning for dind image. (#666)

* Better versioning for dind image.

* Updated dind image used in main build
This commit is contained in:
Travis Reeder
2018-01-09 15:33:26 -08:00
committed by Reed Allman
parent 7a9ead098f
commit eef1025e93
3 changed files with 15 additions and 8 deletions

View File

@@ -6,7 +6,7 @@ ADD . $D
RUN cd $D && go build -o fn-alpine && cp fn-alpine /tmp/
# final stage
FROM fnproject/dind
FROM fnproject/dind:17.12
WORKDIR /app
COPY --from=build-env /tmp/fn-alpine /app/functions
CMD ["./functions"]
COPY --from=build-env /tmp/fn-alpine /app/fnserver
CMD ["./fnserver"]

View File

@@ -1,4 +1,4 @@
FROM docker:17.11-dind
FROM docker:17.12-dind
RUN apk add --no-cache ca-certificates

View File

@@ -1,12 +1,19 @@
set -e
set -ex
./build.sh
# ./build.sh
# Match version with Docker version
version=$(docker run --rm -v "$PWD":/app treeder/bump --extract --input "`docker -v`")
echo "Version: $version"
M=$(docker run --rm treeder/bump --format M --input "$version")
Mm=$(docker run --rm treeder/bump --format M.m --input "$version")
docker tag fnproject/dind:latest fnproject/dind:$version
docker push fnproject/dind:latest
# be nice to have bump image do all of this tagging and pushing too (mount docker sock and do it all)
docker tag fnproject/dind:$version fnproject/dind:$Mm
docker tag fnproject/dind:$version fnproject/dind:$M
docker push fnproject/dind:$version
docker push fnproject/dind:$Mm
docker push fnproject/dind:$M
docker push fnproject/dind:latest