Add synapse build script

This commit is contained in:
Aode 2020-01-28 11:52:45 -06:00
parent ef12cdcef5
commit de58e7236f
3 changed files with 44 additions and 4 deletions

View file

@ -20,18 +20,20 @@ function print_help() {
echo " tag: The tag of the riot-web image the target image is based on"
}
set -xe
require "$TAG" tag
set -xe
sed "s/VERSION/$TAG/g" Dockerfile > "Dockerfile.$TAG"
docker build \
--pull \
--no-cache \
-f "Dockerfile.$TAG" \
-t "asonix/riot-web:$TAG-arm64v8" \
-t asonix/riot-web:latest-arm64v8 \
-t asonix/riot-web:latest \
.
.
docker push "asonix/riot-web:$TAG-arm64v8"
docker push asonix/riot-web:latest-arm64v8

View file

@ -1,4 +1,4 @@
FROM arm64v8/alpine:3.11.2
FROM arm64v8/alpine:3.11.3
ENV UID=991
ENV GID=991

38
synapse/build.sh Executable file
View file

@ -0,0 +1,38 @@
#!/usr/bin//env bash
TAG=$1
function require() {
if [ "$1" = "" ]; then
echo "input '$2' required"
print_help
exit 1
fi
}
function print_help() {
echo "build.sh"
echo ""
echo "Usage:"
echo " build.sh [tag]"
echo ""
echo "Args:"
echo " tag: The tag of the synapse image that is being produced"
}
require "$TAG" tag
set -xe
docker build \
--pull \
--no-cache \
-f Dockerfile \
-t "asonix/synapse:$TAG-arm64v8" \
-t asonix/synapse:latest-arm64v8 \
-t asonix/synapse:latest \
.
docker push "asonix/synapse:$TAG-arm64v8"
docker push asonix/synapse:latest-arm64v8
docker push asonix/synapse:latest