Skip to content

Commit 2671774

Browse files
authored
Merge pull request #481 from flucrezia/docker/dockerfile-fix
Docker build from local copy, expands /var/lib/graphite/ paths in Doc…
2 parents cc8eeda + 2d6927b commit 2671774

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
doc
2+
*.md

Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
FROM golang:1.17.4-alpine3.15 AS build
22

3-
ARG gocarbon_version=0.16.2
4-
ARG gocarbon_repo=https://github.com/go-graphite/go-carbon.git
3+
COPY . /usr/local/src/go-carbon
54
RUN apk add --update git make bash \
6-
&& git clone "${gocarbon_repo}" /usr/local/src/go-carbon \
75
&& cd /usr/local/src/go-carbon \
8-
&& git checkout tags/v"${gocarbon_version}" \
96
&& make go-carbon \
107
&& chmod +x go-carbon && cp -fv go-carbon /tmp
118

129
FROM alpine:3.15
1310

1411
RUN addgroup -S carbon && adduser -S carbon -G carbon \
15-
&& mkdir -p /var/lib/graphite/{whisper,dump,tagging} /var/log/go-carbon /etc/go-carbon/ \
12+
&& mkdir -p /var/lib/graphite/whisper /var/lib/graphite/dump /var/lib/graphite/tagging /var/log/go-carbon /etc/go-carbon/ \
1613
&& chown -R carbon:carbon /var/lib/graphite/ /var/log/go-carbon
1714

1815
COPY --from=build /tmp/go-carbon /usr/sbin/go-carbon

0 commit comments

Comments
 (0)