Add pixelfed build script
This commit is contained in:
parent
de58e7236f
commit
0777ecd829
|
@ -82,7 +82,7 @@ RUN set -ex; \
|
|||
|
||||
RUN rm -r /scratch
|
||||
|
||||
ENV TAG=dev
|
||||
ENV TAG=VERSION
|
||||
|
||||
RUN set -ex; \
|
||||
fetchDeps=git; \
|
||||
|
|
42
pixelfed/build.sh
Executable file
42
pixelfed/build.sh
Executable file
|
@ -0,0 +1,42 @@
|
|||
#!/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 pixelfed image the target image is based on"
|
||||
}
|
||||
|
||||
require "$TAG" tag
|
||||
|
||||
set -xe
|
||||
|
||||
sed "s/VERSION/$TAG/g" Dockerfile > "Dockerfile.$TAG"
|
||||
|
||||
docker build \
|
||||
--pull \
|
||||
--no-cache \
|
||||
-f "Dockerfile.$TAG" \
|
||||
-t "asonix/pixelfed:$TAG-arm64v8" \
|
||||
-t asonix/pixelfed:latest-arm64v8 \
|
||||
-t asonix/pixelfed:latest \
|
||||
.
|
||||
|
||||
docker push "asonix/pixelfed:$TAG-arm64v8"
|
||||
docker push asonix/pixelfed:latest-arm64v8
|
||||
docker push asonix/pixelfed:latest
|
||||
|
||||
rm "Dockerfile.$TAG"
|
Loading…
Reference in a new issue