mirror of
https://github.com/jpillora/chisel
synced 2026-06-08 15:07:02 +00:00
16 lines
447 B
Docker
16 lines
447 B
Docker
# build stage
|
|
FROM golang:alpine AS build
|
|
RUN apk update && apk add git
|
|
ADD . /src
|
|
WORKDIR /src
|
|
ENV CGO_ENABLED=0
|
|
RUN go build \
|
|
-ldflags "-X github.com/jpillora/chisel/share.BuildVersion=$(git describe --abbrev=0 --tags)" \
|
|
-o /tmp/bin
|
|
# run stage
|
|
FROM scratch
|
|
LABEL maintainer="dev@jpillora.com"
|
|
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
WORKDIR /app
|
|
COPY --from=build /tmp/bin /app/bin
|
|
ENTRYPOINT ["/app/bin"] |