-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
37 lines (24 loc) · 1.03 KB
/
Dockerfile
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
FROM golang:alpine AS build
RUN apk --no-cache add build-base git gcc
ENV FRP_VERSION 0.34.1
RUN git clone https://github.com/fatedier/frp.git /frp && cd /frp && git reset --hard v${FRP_VERSION}
RUN cd /frp && make
ADD ./plugins /src
RUN cd /src/portmanager && go build
RUN cd /src/acmeproxy && go mod tidy && go build
RUN cd /src/linknotifier && go mod tidy && go build
FROM alpine:latest
MAINTAINER luka.cehovin@gmail.com
ENV GOTEMP_VERSION 3.5.0
RUN apk add --no-cache wget ca-certificates tar runit
RUN wget https://github.com/hairyhenderson/gomplate/releases/download/v${GOTEMP_VERSION}/gomplate_linux-amd64-slim -O /usr/local/bin/gotemp && \
chmod +x /usr/local/bin/gotemp
COPY --from=build /frp/bin/frps /usr/local/bin/
COPY --from=build /src/portmanager/portmanager /usr/local/bin/
COPY --from=build /src/acmeproxy/acmeproxy /usr/local/bin/
COPY --from=build /src/linknotifier/linknotifier /usr/local/bin/
COPY start_runit /sbin/
COPY etc /etc/
VOLUME /data
EXPOSE 80 443 7000 7001 7500 30000-30900
CMD ["/sbin/start_runit"]