diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index cc3d7e787..cb6e6f7e9 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -108,6 +108,9 @@ jobs: - name: Build OpenAPI Docs run: bin/console azuracast:api:docs + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 @@ -116,6 +119,7 @@ jobs: with: context: . load: true + platforms : linux/amd64,linux/arm64 tags: ghcr.io/azuracast/web:latest cache-from: type=registry,ref=ghcr.io/azuracast/web:buildcache @@ -177,6 +181,7 @@ jobs: with: context: . push: true + platforms : linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-to: type=registry,ref=ghcr.io/azuracast/web:buildcache,mode=max diff --git a/Dockerfile b/Dockerfile index c6505acd7..17646d1b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,18 @@ -# Base install step (done first for caching purposes). -FROM ubuntu:focal as base +FROM golang:1.17-buster AS dockerize + +RUN apt-get update \ + && apt-get install -y --no-install-recommends openssl git + +RUN go install github.com/jwilder/dockerize@latest + +# Final build image +FROM ubuntu:focal ENV TZ="UTC" +# Add Dockerize +COPY --from=dockerize /go/bin/dockerize /usr/local/bin + # Run base build process COPY ./util/docker/web /bd_build/ diff --git a/util/docker/web/setup/dockerize.sh b/util/docker/web/setup/dockerize.sh deleted file mode 100644 index 28f56097c..000000000 --- a/util/docker/web/setup/dockerize.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -set -e -source /bd_build/buildconfig -set -x - -DOCKERIZE_VERSION=v0.6.1 -wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz -tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz -rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz