2022-04-29 01:12:07 +08:00
|
|
|
FROM golang:1.18-alpine3.15 AS building
|
2020-09-30 11:05:34 +08:00
|
|
|
|
2022-04-29 01:12:07 +08:00
|
|
|
COPY . /building
|
|
|
|
WORKDIR /building
|
2020-09-30 11:05:34 +08:00
|
|
|
|
2022-04-29 01:12:07 +08:00
|
|
|
RUN apk --no-cache add \
|
|
|
|
git \
|
|
|
|
&& export GO111MODULE=on \
|
|
|
|
&& env CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o ./bin/frpc ./cmd/frpc
|
2020-09-30 11:05:34 +08:00
|
|
|
|
2022-04-29 01:12:07 +08:00
|
|
|
FROM alpine:3.15
|
|
|
|
LABEL maintainer="i@muir.fun"
|
2020-09-30 11:05:34 +08:00
|
|
|
|
2022-04-29 01:12:07 +08:00
|
|
|
COPY --from=building /building/bin/frpc /usr/bin/frpc
|
2020-09-23 14:54:40 +08:00
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/frpc"]
|
2022-04-29 01:12:07 +08:00
|
|
|
CMD ["-h"]
|