-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (23 loc) · 969 Bytes
/
Dockerfile
File metadata and controls
36 lines (23 loc) · 969 Bytes
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
FROM alpine:3.23 AS build
ARG TARGETARCH
RUN apk add --no-cache build-base make curl musl-dev
WORKDIR /envhttpd/
COPY . /envhttpd/
RUN make -f src/Makefile scratch-install
FROM scratch AS static-artifact
COPY --from=build /envhttpd/bin/envhttpd /envhttpd-static
FROM scratch
LABEL org.opencontainers.image.title="envhttpd"
LABEL org.opencontainers.image.authors="Kilna Anthony <kilna@kilna.com>"
LABEL org.opencontainers.image.url="https://hub.docker.com/r/kilna/envhttpd"
LABEL org.opencontainers.image.source="https://github.com/kilna/envhttpd"
LABEL org.opencontainers.image.documentation="https://github.com/kilna/envhttpd"
LABEL org.opencontainers.image.description="HTTP Server for Environment Variables"
LABEL org.opencontainers.image.licenses="LicenseRef-MIT-Link-License"
COPY --from=build /envhttpd/bin /bin
COPY --from=build /envhttpd/etc /etc
COPY --from=build /envhttpd/var /var
USER www-data
ENTRYPOINT [ "/bin/envhttpd" ]
EXPOSE 8111
CMD []