Dockerfile_multiple_build 493 B

123456789101112131415161718192021
  1. FROM golang:1.8 as frpBuild
  2. COPY . /go/src/github.com/fatedier/frp
  3. ENV CGO_ENABLED=0
  4. RUN cd /go/src/github.com/fatedier/frp \
  5. && make
  6. FROM alpine:3.6
  7. COPY --from=frpBuild /go/src/github.com/fatedier/frp/bin/frpc /
  8. COPY --from=frpBuild /go/src/github.com/fatedier/frp/conf/frpc.ini /
  9. COPY --from=frpBuild /go/src/github.com/fatedier/frp/bin/frps /
  10. COPY --from=frpBuild /go/src/github.com/fatedier/frp/conf/frps.ini /
  11. EXPOSE 80 443 6000 7000 7500
  12. WORKDIR /
  13. CMD ["/frps","-c","frps.ini"]