fleet/infrastructure/sandbox/JITProvisioner/ingress_destroyer/Dockerfile
Roberto Dip e46e83baf8
upgrade Go to 1.21.1 for infra (#13878)
related to #13715, this updates the infra dependencies for the general
go upgrade that's happening at
https://github.com/fleetdm/fleet/pull/13877

I'm thinking we probably want to merge this after we're sure that
everything works well, maybe even after we have a release with go 1.21.1
out, so I'm making a separate PR.

---------

Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
2023-10-12 21:09:17 -05:00

23 lines
512 B
Docker

FROM golang:1.21.1-bullseye@sha256:357be9f9e594a338ba16f54c4df16481e7e82533a6571cecaf22dca833622f91 as BUILDER
WORKDIR /src
RUN apt update && apt upgrade -y
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY main.go .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-extldflags '-static'"
FROM public.ecr.aws/aws-cli/aws-cli:latest
COPY --from=BUILDER /src/ingress_destroyer /usr/local/bin/ingress_destroyer
RUN chmod +x /usr/local/bin/ingress_destroyer
ENTRYPOINT ["ingress_destroyer"]