github.com/go-graphite/carbonapi@v0.17.0/Dockerfile (about)

     1  FROM golang:alpine as builder
     2  
     3  LABEL org.opencontainers.image.source https://github.com/go-graphite/carbonapi
     4  
     5  WORKDIR /go/src/github.com/go-graphite/carbonapi
     6  
     7  COPY . .
     8  
     9  RUN apk --no-cache add make gcc git cairo-dev musl-dev
    10  RUN make && make test
    11  
    12  # If you have "Operation not permitted" errors, please refer to https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0#faccessat2
    13  # TLDR; Either update docker/moby and libseccomp or switch to alpine:3.13 (builder needs to be switched to 1.16-alpine3.13 as well).
    14  # See https://github.com/go-graphite/carbonapi/issues/639#issuecomment-896570456 for detailed information
    15  FROM alpine:latest
    16  
    17  RUN apk --no-cache add ca-certificates cairo
    18  WORKDIR /
    19  
    20  COPY --from=builder /go/src/github.com/go-graphite/carbonapi/carbonapi ./usr/bin/carbonapi
    21  
    22  CMD ["carbonapi", "-config", "/etc/carbonapi.yml"]