2024-09-23 22:30:52 -04:00
|
|
|
# Alpine 3.20
|
|
|
|
FROM golang:1.23.1-alpine3.20
|
|
|
|
RUN apk install --no-cache zip
|
2024-09-23 21:55:45 -04:00
|
|
|
|
2020-04-11 15:29:35 -04:00
|
|
|
# copy entrypoint file
|
|
|
|
COPY entrypoint.go /usr/bin/entrypoint.go
|
|
|
|
|
|
|
|
# change mode of the entrypoint file
|
|
|
|
RUN chmod +x /usr/bin/entrypoint.go
|
|
|
|
|
2024-09-23 22:30:52 -04:00
|
|
|
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /go-xbuild
|
|
|
|
|
2020-04-11 15:29:35 -04:00
|
|
|
# set entrypoint command
|
2024-09-23 22:30:52 -04:00
|
|
|
ENTRYPOINT [ "/go-xbuild"]
|