-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.frps
41 lines (26 loc) · 935 Bytes
/
Dockerfile.frps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
ARG ALPINE_VERSION=3.18.4
ARG FRP_VERSION=0.52.3
# First step: install frp
FROM alpine:"$ALPINE_VERSION" AS installer
ARG FRP_VERSION
ARG OS=linux
ARG ARCH=amd64
RUN apk add --no-cache wget tar
RUN wget https://github.com/fatedier/frp/releases/download/v"$FRP_VERSION"/frp_"$FRP_VERSION"_"$OS"_"$ARCH".tar.gz \
&& tar xvf frp_"$FRP_VERSION"_"$OS"_"$ARCH".tar.gz \
&& mv frp_"$FRP_VERSION"_"$OS"_"$ARCH" frp \
&& cd frp \
&& rm frpc frps.toml frpc.toml LICENSE
# Copies server configuration file
COPY ./test-env-config/frps.toml /frp/frps.toml
# Final image
FROM alpine:"$ALPINE_VERSION"
RUN addgroup -S -g 10001 server_group && adduser -SH -u 10001 -G server_group frp_server
# Debug tools
RUN apk add --no-cache curl bind-tools
COPY --from=installer /frp/ /frp/
WORKDIR /frp/
RUN chown -R frp_server:server_group . && chmod 555 frps && mv frps /bin
USER frp_server
ENTRYPOINT [ "sh" ]
CMD [ "-c", "frps -c frps.toml" ]