CI: Fix ARMv7 build scripts
This commit is contained in:
parent
704953e867
commit
157d38fe8f
5 changed files with 61 additions and 9 deletions
16
Makefile
16
Makefile
|
@ -205,22 +205,22 @@ clean:
|
|||
docker-development:
|
||||
docker pull --platform=amd64 ubuntu:21.10
|
||||
docker pull --platform=arm64 ubuntu:21.10
|
||||
scripts/docker/multarch.sh development linux/amd64,linux/arm64 $(DOCKER_TAG)
|
||||
scripts/docker/multiarch.sh development linux/amd64,linux/arm64 $(DOCKER_TAG)
|
||||
docker-preview:
|
||||
scripts/docker/multarch.sh photoprism linux/amd64,linux/arm64
|
||||
scripts/docker/multiarch.sh photoprism linux/amd64,linux/arm64
|
||||
docker-release:
|
||||
scripts/docker/multarch.sh photoprism linux/amd64,linux/arm64 $(DOCKER_TAG)
|
||||
scripts/docker/multiarch.sh photoprism linux/amd64,linux/arm64 $(DOCKER_TAG)
|
||||
docker-armv7-preview:
|
||||
scripts/docker/multarch.sh photoprism linux/arm armv7-preview /armv7
|
||||
scripts/docker/arch.sh photoprism linux/arm armv7-preview /armv7
|
||||
docker-armv7-release:
|
||||
scripts/docker/multarch.sh photoprism linux/arm armv7 /armv7
|
||||
scripts/docker/arch.sh photoprism linux/arm armv7 /armv7
|
||||
docker-local:
|
||||
scripts/docker/build.sh photoprism
|
||||
docker-pull:
|
||||
docker pull photoprism/photoprism:preview photoprism/photoprism:latest
|
||||
docker-goproxy:
|
||||
docker pull golang:alpine
|
||||
scripts/docker/multarch.sh goproxy linux/amd64,linux/arm64 $(DOCKER_TAG)
|
||||
scripts/docker/multiarch.sh goproxy linux/amd64,linux/arm64 $(DOCKER_TAG)
|
||||
docker-demo:
|
||||
scripts/docker/build.sh demo $(DOCKER_TAG)
|
||||
scripts/docker/push.sh demo $(DOCKER_TAG)
|
||||
|
@ -231,11 +231,11 @@ docker-demo-local:
|
|||
docker-dummy-webdav:
|
||||
docker pull --platform=amd64 golang:1
|
||||
docker pull --platform=arm64 golang:1
|
||||
scripts/docker/multarch.sh dummy-webdav linux/amd64,linux/arm64 $(DOCKER_TAG)
|
||||
scripts/docker/multiarch.sh dummy-webdav linux/amd64,linux/arm64 $(DOCKER_TAG)
|
||||
docker-dummy-oidc:
|
||||
docker pull --platform=amd64 golang:1
|
||||
docker pull --platform=arm64 golang:1
|
||||
scripts/docker/multarch.sh dummy-oidc linux/amd64,linux/arm64 $(DOCKER_TAG)
|
||||
scripts/docker/multiarch.sh dummy-oidc linux/amd64,linux/arm64 $(DOCKER_TAG)
|
||||
packer-digitalocean:
|
||||
$(info Buildinng DigitalOcean marketplace image...)
|
||||
(cd ./docker/examples/cloud && packer build digitalocean.json)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
##################################################### BUILD STAGE ######################################################
|
||||
FROM ubuntu:21.10
|
||||
FROM ubuntu:21.10 as build
|
||||
|
||||
LABEL maintainer="Michael Mayer <hello@photoprism.org>"
|
||||
|
||||
|
|
52
scripts/docker/arch.sh
Executable file
52
scripts/docker/arch.sh
Executable file
|
@ -0,0 +1,52 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# https://docs.docker.com/develop/develop-images/build_enhancements/#to-enable-buildkit-builds
|
||||
export DOCKER_BUILDKIT=1
|
||||
|
||||
if [[ -z $1 ]] || [[ -z $2 ]]; then
|
||||
echo "Please provide the image name, and a list of target architectures e.g. linux/amd64,linux/arm64,linux/arm" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NUMERIC='^[0-9]+$'
|
||||
GOPROXY=${GOPROXY:-'https://goproxy.io,direct'}
|
||||
|
||||
if [[ $1 ]] && [[ $2 ]] && [[ -z $3 ]]; then
|
||||
echo "Building 'photoprism/$1:preview'..."
|
||||
DOCKER_TAG=$(date -u +%Y%m%d)
|
||||
docker buildx build \
|
||||
--platform $2 \
|
||||
--pull \
|
||||
--build-arg BUILD_TAG=$DOCKER_TAG \
|
||||
--build-arg GOPROXY \
|
||||
--build-arg GODEBUG \
|
||||
-f docker/${1/-//}/Dockerfile \
|
||||
-t photoprism/$1:preview \
|
||||
--push .
|
||||
elif [[ $3 =~ $NUMERIC ]]; then
|
||||
echo "Building 'photoprism/$1:$3'..."
|
||||
docker buildx build \
|
||||
--platform $2 \
|
||||
--pull \
|
||||
--build-arg BUILD_TAG=$3 \
|
||||
--build-arg GOPROXY \
|
||||
--build-arg GODEBUG \
|
||||
-f docker/${1/-//}/Dockerfile \
|
||||
-t photoprism/$1:latest \
|
||||
-t photoprism/$1:$3 \
|
||||
--push .
|
||||
else
|
||||
echo "Building 'photoprism/$1:$3' in docker/${1/-//}$4/Dockerfile..."
|
||||
DOCKER_TAG=$(date -u +%Y%m%d)
|
||||
docker buildx build \
|
||||
--platform $2 \
|
||||
--pull \
|
||||
--build-arg BUILD_TAG=$DOCKER_TAG \
|
||||
--build-arg GOPROXY \
|
||||
--build-arg GODEBUG \
|
||||
-f docker/${1/-//}$4/Dockerfile \
|
||||
-t photoprism/$1:$3 \
|
||||
--push .
|
||||
fi
|
||||
|
||||
echo "Done"
|
0
scripts/sql/init-test-databases.sql
Normal file → Executable file
0
scripts/sql/init-test-databases.sql
Normal file → Executable file
0
scripts/sql/reset-mariadb.sql
Normal file → Executable file
0
scripts/sql/reset-mariadb.sql
Normal file → Executable file
Loading…
Reference in a new issue