代码拉取完成,页面将自动刷新
# STEP 1 build executable binary
FROM golang:1.14-alpine as builder
WORKDIR $GOPATH/src/github.com/asciimoo/filtron
# add gcc musl-dev for "go test"
RUN apk add --no-cache git
COPY . .
RUN go get -d -v
RUN gofmt -l ./
# RUN go vet -v ./...
# RUN go test -v ./...
RUN go build .
# STEP 2 build the image including only the binary
FROM alpine:3.12
EXPOSE 3000
RUN apk --no-cache add ca-certificates \
&& adduser -D -h /usr/local/filtron -s /bin/false filtron filtron
COPY configs/rules.json /etc/filtron/rules.json
COPY --from=builder /go/src/github.com/asciimoo/filtron/filtron /usr/local/filtron/filtron
USER filtron
ENTRYPOINT ["/usr/local/filtron/filtron", "--rules", "/etc/filtron/rules.json"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。