Skip to content

Commit

Permalink
Merge pull request #481 from flucrezia/docker/dockerfile-fix
Browse files Browse the repository at this point in the history
Docker build from local copy, expands /var/lib/graphite/ paths in Doc…
  • Loading branch information
deniszh authored Jul 20, 2022
2 parents cc8eeda + 2d6927b commit 2671774
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
doc
*.md
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
FROM golang:1.17.4-alpine3.15 AS build

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

FROM alpine:3.15

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

COPY --from=build /tmp/go-carbon /usr/sbin/go-carbon
Expand Down

0 comments on commit 2671774

Please sign in to comment.