Skip to content

Commit fc34746

Browse files
authored
Merge pull request #841 from ekristen/fix-dockerfile
fix(dockerfile): update to use targetplatform
2 parents a6620b1 + ed2691c commit fc34746

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1.20-labs@sha256:dbcde2ebc4abc8bb5c3c499b9c9a6876842bf5da243951cd2697f921a7aeb6a9
2-
FROM alpine:3.23.2@sha256:865b95f46d98cf867a156fe4a135ad3fe50d2056aa3f25ed31662dff6da4eb62 as base
2+
FROM alpine:3.23.2@sha256:865b95f46d98cf867a156fe4a135ad3fe50d2056aa3f25ed31662dff6da4eb62 AS base
33
RUN apk add --no-cache ca-certificates
44
RUN adduser -D aws-nuke
55

@@ -13,12 +13,13 @@ RUN \
1313
go build -ldflags '-s -w -extldflags="-static"' -o bin/aws-nuke main.go
1414

1515
FROM base AS goreleaser
16+
ARG TARGETPLATFORM
1617
ENTRYPOINT ["/usr/local/bin/aws-nuke"]
17-
COPY aws-nuke /usr/local/bin/aws-nuke
18+
COPY $TARGETPLATFORM/aws-nuke /usr/local/bin/aws-nuke
1819
USER aws-nuke
1920

2021
FROM base
2122
ENTRYPOINT ["/usr/local/bin/aws-nuke"]
2223
COPY --from=build --chmod=755 /src/bin/aws-nuke /usr/local/bin/aws-nuke
2324
RUN chmod +x /usr/local/bin/aws-nuke
24-
USER aws-nuke
25+
USER aws-nuke

0 commit comments

Comments
 (0)