diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index 3290595..14fbbb2 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -138,7 +138,7 @@ jobs: strategy: fail-fast: false matrix: - container-image-arch: [ amd64, arm64, arm ] + container-image-arch: [ amd64, arm64 ] steps: - name: Checkout code uses: actions/checkout@v3 @@ -234,17 +234,11 @@ jobs: with: name: arm64 path: . - - name: Download arm Container Image - uses: actions/download-artifact@v3 - with: - name: arm - path: . - name: Restore container images run: | podman load --input amd64.tar podman load --input arm64.tar - podman load --input arm.tar - name: Create container image manifest run: buildah manifest create multiarch-manifest @@ -253,7 +247,6 @@ jobs: run: | buildah manifest add multiarch-manifest ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}_amd64 buildah manifest add multiarch-manifest ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}_arm64 - buildah manifest add multiarch-manifest ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}_arm - name: Login to docker hub run: podman login docker.io --username ${{ secrets.DOCKERHUB_USERNAME }} --password ${{ secrets.DOCKERHUB_PASSWORD }} diff --git a/Containerfile b/Containerfile index f013b89..78cb799 100644 --- a/Containerfile +++ b/Containerfile @@ -1,17 +1,13 @@ # # # # # # # # # # # # # # # # # # # # # Builder # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -FROM alpine:3 as builder +FROM rust:alpine as builder # Create a cache directory that will be copied into the final image RUN mkdir "/cache" # Install ssl certificates that will also be copied into the final image -RUN apk update && apk add --no-cache ca-certificates - -# Install Rust toolchain -RUN apk add --no-cache build-base git curl -RUN curl '=https' --tlsv1.2 https://sh.rustup.rs > /rustup.sh && sh /rustup.sh -y +RUN apk update && apk add --no-cache alpine-sdk ca-certificates # Update crates io index via git cli, otherwise we'll an out of memory when building for arm https://github.com/rust-lang/cargo/issues/9167 RUN mkdir -p ~/.cargo/ @@ -27,7 +23,7 @@ COPY Cargo.toml Cargo.lock /app/ COPY src/ /app/src # Build the application -RUN ~/.cargo/bin/cargo build --release +RUN cargo build --release # # # # # # # # # # # # # # # # # # # # # Run image