Skip to content

Commit

Permalink
Add support for versioned docker tags
Browse files Browse the repository at this point in the history
Fixes atmoz#291
  • Loading branch information
Nico Schottelius committed Nov 19, 2021
1 parent 302390e commit 93f8bac
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:buster
FROM debian:VERSION
MAINTAINER Adrian Dvergsdal [atmoz.net]

# Steps done in one RUN layer:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:latest
FROM alpine:VERSION
MAINTAINER Adrian Dvergsdal [atmoz.net]

# Steps done in one RUN layer:
Expand Down
19 changes: 19 additions & 0 deletions alpine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

if [ $# -ne 1 ]; then
echo "$0 version"
echo "builds image with alpine <version>, i.e. '3.14'"
exit 1
fi

set -e

version=$1; shift

tmp=$(mktemp)
tag=atmoz/sftp:alpine-$version

sed "s/alpine:VERSION/alpine:$version/" Dockerfile-alpine > $tmp
docker build -t "$tag" -f "$tmp" .
docker push "$tag"
rm -f "$tmp"
19 changes: 19 additions & 0 deletions debian.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

if [ $# -ne 1 ]; then
echo "$0 version"
echo "builds image with debian <version>, i.e. 'bullseye'"
exit 1
fi

set -e

version=$1; shift

tmp=$(mktemp)
tag=atmoz/sftp:debian-$version

sed "s/debian:VERSION/debian:$version/" Dockerfile > $tmp
docker build -t "$tag" -f "$tmp" .
docker push "$tag"
rm -f "$tmp"

0 comments on commit 93f8bac

Please sign in to comment.