Skip to content

Commit 6910c91

Browse files
committed
Build from scratch
Signed-off-by: Liam Newman <liam@verta.ai>
1 parent 9b33bd6 commit 6910c91

File tree

2 files changed

+25
-49
lines changed

2 files changed

+25
-49
lines changed

alpine-glibc/Dockerfile

Lines changed: 0 additions & 49 deletions
This file was deleted.

alpine/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
ARG ARCH=""
2+
FROM ${ARCH}alpine:latest as alpine
3+
4+
RUN apk upgrade -U && \
5+
apk add tzdata ca-certificates busybox-static
6+
7+
# remove extra package
8+
RUN apk del libc-utils
9+
10+
# remove apk files and directories
11+
RUN apk del apk-tools && \
12+
find / -name apk -prune -exec rm -rf {} ";"
13+
14+
# Use the busybox.static to avoid dynamic library dependencies.
15+
RUN mv /bin/busybox.static /bin/busybox && \
16+
/bin/busybox --install -s /bin
17+
18+
# remove extraneous folders
19+
RUN rm -rf media mnt opt run srv
20+
21+
FROM scratch
22+
MAINTAINER The Prometheus Authors <prometheus-developers@googlegroups.com>
23+
24+
COPY --from=alpine / /
25+

0 commit comments

Comments
 (0)