-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (30 loc) · 892 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM alpine:3.10.0 as builder
RUN mkdir -p /app/bin
WORKDIR /app
RUN apk upgrade --update-cache --available && \
apk add ghc \
alpine-sdk \
curl \
gmp \
gmp-dev \
libffi \
libffi-dev \
musl-dev \
zlib-dev \
cabal
COPY CHANGELOG.md /app
COPY LICENSE /app
COPY Setup.hs /app
COPY azure-exporter.cabal /app
COPY src/ /app/src
COPY stack.yaml /app
RUN cabal new-update && \
cabal new-install -fstatic azure-exporter
RUN cp /root/.cabal/bin/azure-exporter /app/bin/azure-exporter
FROM alpine:3.10.0
RUN mkdir -p /app/bin
WORKDIR /app/bin
RUN apk add ca-certificates
COPY --from=builder /app/bin/azure-exporter /app/bin/azure-exporter
EXPOSE 3000
ENTRYPOINT ["/app/bin/azure-exporter"]