Adrià Vilanova Martínez | 6318eab | 2022-07-19 20:18:25 +0200 | [diff] [blame] | 1 | FROM golang:1.18 as builder |
Adrià Vilanova Martínez | e73997b | 2022-07-19 18:58:55 +0200 | [diff] [blame] | 2 | |
| 3 | ENV CGO_ENABLED=0 |
| 4 | |
| 5 | ENV GO111MODULE=on |
| 6 | ENV GOPROXY=https://proxy.golang.org |
| 7 | |
| 8 | RUN mkdir /gocache |
| 9 | ENV GOCACHE /gocache |
| 10 | |
| 11 | WORKDIR /go/src/gomodules.avm99963.com/vulnzybot |
| 12 | COPY . /go/src/gomodules.avm99963.com/vulnzybot |
| 13 | |
| 14 | RUN go install gomodules.avm99963.com/vulnzybot |
| 15 | |
| 16 | FROM alpine |
| 17 | LABEL maintainer "me@avm99963.com" |
| 18 | |
| 19 | COPY crontab /etc/crontabs/root |
| 20 | RUN chmod 0644 /etc/crontabs/root |
| 21 | RUN chown root:root /etc/crontabs/root |
| 22 | |
| 23 | COPY --from=builder /go/bin/vulnzybot / |
| 24 | RUN chmod +x /vulnzybot |
| 25 | |
| 26 | CMD ["crond", "-f", "-d", "8"] |