mirror of https://github.com/fatedier/frp.git
docker build&push: some adjustments
parent
44eb513f05
commit
a72259c604
@ -1,17 +1,12 @@
|
||||
FROM golang:1.18-alpine3.15 AS building
|
||||
FROM golang:1.18 AS building
|
||||
|
||||
COPY . /building
|
||||
WORKDIR /building
|
||||
|
||||
RUN apk --no-cache add \
|
||||
git \
|
||||
&& export GO111MODULE=on \
|
||||
&& env CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o ./bin/frpc ./cmd/frpc
|
||||
RUN make frpc
|
||||
|
||||
FROM alpine:3.15
|
||||
LABEL maintainer="i@muir.fun"
|
||||
FROM alpine:3
|
||||
|
||||
COPY --from=building /building/bin/frpc /usr/bin/frpc
|
||||
|
||||
ENTRYPOINT ["/usr/bin/frpc"]
|
||||
CMD ["-h"]
|
@ -1,17 +1,12 @@
|
||||
FROM golang:1.18-alpine3.15 AS building
|
||||
FROM golang:1.18 AS building
|
||||
|
||||
COPY . /building
|
||||
WORKDIR /building
|
||||
|
||||
RUN apk --no-cache add \
|
||||
git \
|
||||
&& export GO111MODULE=on \
|
||||
&& env CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o ./bin/frps ./cmd/frps
|
||||
RUN make frps
|
||||
|
||||
FROM alpine:3.15
|
||||
LABEL maintainer="i@muir.fun"
|
||||
FROM alpine:3
|
||||
|
||||
COPY --from=building /building/bin/frps /usr/bin/frps
|
||||
|
||||
ENTRYPOINT ["/usr/bin/frps"]
|
||||
CMD ["-h"]
|
Loading…
Reference in New Issue