Created
July 28, 2019 04:17
-
-
Save kjmkznr/f35c392dfce175b8c75923cdb653a319 to your computer and use it in GitHub Desktop.
Mackerel Container Agent Image for ARM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:alpine AS builder | |
RUN apk update && \ | |
apk add --no-cache git ca-certificates && \ | |
update-ca-certificates | |
ENV CGO_ENABLED=0 | |
ENV GOOS=linux | |
ENV GOARCH=arm | |
ENV GOARM=7 | |
COPY . /src/ | |
WORKDIR /src/ | |
RUN go build -o /mackerel-container-agent ./cmd/mackerel-container-agent/... | |
# Create appuser | |
RUN adduser -D -g '' mackerel | |
FROM scratch | |
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | |
COPY --from=builder /etc/passwd /etc/passwd | |
COPY --from=builder /mackerel-container-agent /usr/local/bin/mackerel-container-agent | |
ENTRYPOINT ["/usr/local/bin/mackerel-container-agent"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment