Skip to content

Commit 640f554

Browse files
committed
Fix volume permissions
1 parent 54b1b62 commit 640f554

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
FROM golang:1.12 as builder
22
WORKDIR /go/src/github.com/camptocamp/prometheus-puppetdb-sd
3+
RUN mkdir -p /etc/prometheus/puppetdb-sd/ && chown -R 1001:root /etc/prometheus/puppetdb-sd/ && chmod -R g=u /etc/prometheus/puppetdb-sd/
34
COPY . .
45
RUN make prometheus-puppetdb-sd
5-
RUN mkdir /data && touch /data/targets.yml && chown -R 1001.root /data && chmod -R g=u /data
66

77
FROM scratch
88
COPY --from=builder /go/src/github.com/camptocamp/prometheus-puppetdb-sd/prometheus-puppetdb-sd /
9-
COPY --from=builder /data/targets.yml /data/targets.yml
10-
VOLUME /data
9+
COPY --from=builder --chown=1001:0 /etc/prometheus /etc/prometheus
10+
VOLUME /etc/prometheus/puppetdb-sd/
1111
USER 1001
1212
ENTRYPOINT ["/prometheus-puppetdb-sd"]

0 commit comments

Comments
 (0)