# step 1: build web FROM node:19-alpine as web-build WORKDIR /build COPY ./web/frps/package.json . RUN npm install --no-audit --progress=false --prefer-offline COPY ./web/frps/ . RUN npm install && npm run build # step 2: build frps FROM golang:1.20 AS building WORKDIR /building COPY go.mod . COPY go.sum . RUN go mod download COPY . . COPY --from=web-build /build/dist/ ./assets/frps/static RUN make frps # step 3: release FROM alpine:3 COPY --from=building /building/bin/frps /usr/bin/frps ENTRYPOINT ["/usr/bin/frps","-c","/etc/frp/frps.ini"]