ДС
Size: a a a
ДС
f
FROM golang:1.11-alpine as builder
RUN \
cd / && \
apk update && \
apk add --no-cache git ca-certificates make tzdata && \
git clone https://github.com/inCaller/prometheus_bot && \
cd prometheus_bot && \
go get -d -v && \
CGO_ENABLED=0 GOOS=linux go build -v -a -installsuffix cgo -o prometheus_bot
FROM alpine:3.9
COPY --from=builder /prometheus_bot/prometheus_bot /
RUN apk add --no-cache ca-certificates tzdata tini
USER nobody
EXPOSE 9087
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/prometheus_bot"]
ДС
FROM golang:1.11-alpine as builder
RUN \
cd / && \
apk update && \
apk add --no-cache git ca-certificates make tzdata && \
git clone https://github.com/inCaller/prometheus_bot && \
cd prometheus_bot && \
go get -d -v && \
CGO_ENABLED=0 GOOS=linux go build -v -a -installsuffix cgo -o prometheus_bot
FROM alpine:3.9
COPY --from=builder /prometheus_bot/prometheus_bot /
RUN apk add --no-cache ca-certificates tzdata tini
USER nobody
EXPOSE 9087
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/prometheus_bot"]
f
ДС
f
f
ДС
f
[Unit]
Description=prometheus_bot
[Service]
WorkingDirectory=/opt/prometheus_bot
ExecStart=/opt/prometheus_bot -c config.yaml
RestartSec=10s
Restart=on-failure
[Install]
WantedBy=multi-user.target
ДС
ДС
f
f
ДС
ДС
ДС
f
f
f
ДС