-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
FROM debian:latest as builder | ||
FROM alpine:latest as builder | ||
|
||
ARG VERSION=0.2.0 | ||
|
||
RUN apt update && \ | ||
apt install -y curl && \ | ||
curl -sLo /tmp/messagebird_exporter.deb \ | ||
https://github.com/roaldnefs/messagebird_exporter/releases/download/v${VERSION}/messagebird_exporter_${VERSION}_linux_amd64.deb && \ | ||
apt install -y /tmp/messagebird_exporter.deb | ||
WORKDIR /tmp | ||
RUN apk update && \ | ||
apk add curl && \ | ||
curl -sLo ./messagebird_exporter.tar.gz \ | ||
https://github.com/roaldnefs/messagebird_exporter/releases/download/v${VERSION}/messagebird_exporter_${VERSION}_linux_amd64.tar.gz && \ | ||
tar -xf messagebird_exporter.tar.gz | ||
|
||
|
||
FROM debian:latest as production | ||
FROM alpine:latest as production | ||
LABEL maintainer="[email protected]" | ||
|
||
RUN adduser --system -uid 800 --no-create-home messagebird_exporter | ||
#RUN adduser --system -uid 800 --no-create-home messagebird_exporter | ||
RUN addgroup -S -g 800 messagebird_exporter \ | ||
&& adduser -S -u 800 -S -H -D -G messagebird_exporter messagebird_exporter | ||
|
||
COPY --from=builder /usr/bin/messagebird_exporter /usr/bin/messagebird_exporter | ||
COPY --from=builder /tmp/messagebird_exporter /usr/bin/messagebird_exporter | ||
|
||
WORKDIR /tmp | ||
USER messagebird_exporter | ||
|