25 lines
783 B
Plaintext
25 lines
783 B
Plaintext
FROM golang:1.21 AS builder
|
|
|
|
WORKDIR /building
|
|
COPY . .
|
|
|
|
RUN groupadd -g 1000 frps && useradd -u 1000 -g frps frps \
|
|
&& make frps
|
|
|
|
FROM alpine:3.18
|
|
|
|
LABEL org.opencontainers.image.authors="fatedier <fatedier@gmail.com>"
|
|
LABEL org.opencontainers.image.base.name="docker.io/library/alpine:3.18"
|
|
LABEL org.opencontainers.image.description="A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet."
|
|
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
LABEL org.opencontainers.image.source="https://github.com/fatedier/frp"
|
|
LABEL org.opencontainers.image.title="frps (server)"
|
|
|
|
WORKDIR /
|
|
COPY --from=builder /etc/passwd /etc/
|
|
COPY --from=builder --chown=1000:1000 /building/bin/frps /usr/local/bin/
|
|
|
|
USER frps
|
|
|
|
ENTRYPOINT ["/usr/local/bin/frps"]
|