mirror of
https://gitea.mrx.ltd/go-pkg/drone-kubernetes.git
synced 2025-09-17 04:05:49 +08:00
20 lines
285 B
Docker
20 lines
285 B
Docker
FROM golang:alpine as build
|
|
|
|
WORKDIR /build
|
|
|
|
COPY . .
|
|
|
|
ENV GO111MODULE=on
|
|
ENV GOPROXY=https://goproxy.cn,direct
|
|
|
|
RUN go mod download && go build -o app
|
|
|
|
RUN ls -lh && chmod +x ./app
|
|
|
|
FROM alpine
|
|
|
|
COPY --from=build /build/app /bin
|
|
|
|
RUN ls -al /bin/ | grep 'app'
|
|
|
|
ENTRYPOINT ["/bin/app"] |