Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

docker: remove redundant target platform #3158

Merged
merged 2 commits into from
Aug 30, 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
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ jobs:
if: github.event_name != 'pull_request'
run: |
echo 'metadata<<EOF' >> $GITHUB_OUTPUT
echo '${{ steps.bake.outputs.metadata }}' | jq -c 'map_values({ digest: .["containerimage.digest"], tags: (.["image.name"] | split(",")) })' >> $GITHUB_OUTPUT
echo '${{ steps.bake.outputs.metadata }}' | jq -c 'with_entries(select(.value | (type == "object" and has("containerimage.digest")))) | map_values({ digest: .["containerimage.digest"], tags: (.["image.name"] | split(",")) })' >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT

- name: Sign the images with GitHub Actions provided token
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ COPY ./translations/ /share/translations
##################################
## Runtime stage, debug variant ##
##################################
FROM --platform=${TARGETPLATFORM} gcr.io/distroless/cc-debian${DEBIAN_VERSION}:debug-nonroot AS debug
FROM gcr.io/distroless/cc-debian${DEBIAN_VERSION}:debug-nonroot AS debug

ARG TARGETARCH
COPY --from=builder /usr/local/bin/mas-cli-${TARGETARCH} /usr/local/bin/mas-cli
Expand All @@ -185,7 +185,7 @@ ENTRYPOINT ["/usr/local/bin/mas-cli"]
###################
## Runtime stage ##
###################
FROM --platform=${TARGETPLATFORM} gcr.io/distroless/cc-debian${DEBIAN_VERSION}:nonroot
FROM gcr.io/distroless/cc-debian${DEBIAN_VERSION}:nonroot

ARG TARGETARCH
COPY --from=builder /usr/local/bin/mas-cli-${TARGETARCH} /usr/local/bin/mas-cli
Expand Down
14 changes: 7 additions & 7 deletions tools/syn2mas/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ COPY ./package.json ./package-lock.json ./
RUN sed -i '/"prepare"/d' package.json
RUN --network=default \
npm ci \
--target_arch=amd64 \
--target_platform=linux \
--omit=dev
--target_arch=amd64 \
--target_platform=linux \
--omit=dev

WORKDIR /deps/amd64

Expand All @@ -30,13 +30,13 @@ COPY ./package.json ./package-lock.json ./
RUN sed -i '/"prepare"/d' package.json
RUN --network=default \
npm ci \
--target_arch=x64 \
--target_platform=linux \
--omit=dev
--target_arch=x64 \
--target_platform=linux \
--omit=dev


# Runtime stage
FROM --platform=${TARGETPLATFORM} gcr.io/distroless/nodejs18-debian12:debug-nonroot
FROM gcr.io/distroless/nodejs18-debian12:debug-nonroot

WORKDIR /syn2mas
COPY ./package.json ./package-lock.json ./
Expand Down
Loading