Add synapse build script
This commit is contained in:
parent
ef12cdcef5
commit
de58e7236f
3 changed files with 44 additions and 4 deletions
|
@ -20,13 +20,15 @@ function print_help() {
|
||||||
echo " tag: The tag of the riot-web image the target image is based on"
|
echo " tag: The tag of the riot-web image the target image is based on"
|
||||||
}
|
}
|
||||||
|
|
||||||
set -xe
|
|
||||||
|
|
||||||
require "$TAG" tag
|
require "$TAG" tag
|
||||||
|
|
||||||
|
set -xe
|
||||||
|
|
||||||
sed "s/VERSION/$TAG/g" Dockerfile > "Dockerfile.$TAG"
|
sed "s/VERSION/$TAG/g" Dockerfile > "Dockerfile.$TAG"
|
||||||
|
|
||||||
docker build \
|
docker build \
|
||||||
|
--pull \
|
||||||
|
--no-cache \
|
||||||
-f "Dockerfile.$TAG" \
|
-f "Dockerfile.$TAG" \
|
||||||
-t "asonix/riot-web:$TAG-arm64v8" \
|
-t "asonix/riot-web:$TAG-arm64v8" \
|
||||||
-t asonix/riot-web:latest-arm64v8 \
|
-t asonix/riot-web:latest-arm64v8 \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM arm64v8/alpine:3.11.2
|
FROM arm64v8/alpine:3.11.3
|
||||||
|
|
||||||
ENV UID=991
|
ENV UID=991
|
||||||
ENV GID=991
|
ENV GID=991
|
||||||
|
|
38
synapse/build.sh
Executable file
38
synapse/build.sh
Executable 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
|
Loading…
Reference in a new issue