Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use setup-qemu-action instead #2621

Merged
merged 4 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/push_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ jobs:
docker login \
--username '${{ secrets.DOCKER_USERNAME }}' \
--password '${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}'
- name: setup-qemu
run: |
docker run --rm --privileged multiarch/qemu-user-static \
--reset \
-p yes
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
Expand All @@ -60,6 +57,8 @@ jobs:
tags: ${{ matrix.docker.repo }}:git-${{ github.sha }}
file: ${{ matrix.docker.dockerfile }}
build-args: COMMIT=git-${{ github.sha }}
env:
BUILDKIT_PROGRESS: 'plain'

tag:
name: tag (${{ matrix.docker.repo }})
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /app
ARG COMMIT
ARG TARGETPLATFORM
Expand Down Expand Up @@ -31,7 +31,7 @@ fi
EOF

# Build runtime image
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim
WORKDIR /app
COPY --from=build-env /app/out .

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.ACC
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use the SDK image to build the app
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build-env
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /app
ARG COMMIT
ARG TARGETPLATFORM
Expand Down Expand Up @@ -32,7 +32,7 @@ fi
EOF

# Build runtime image
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim
WORKDIR /app
RUN apt-get update && apt-get install -y libc6-dev
COPY --from=build-env /app/out .
Expand Down
Loading