Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build from local copy, expands /var/lib/graphite/ paths in Doc… #481

Merged
merged 1 commit into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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