Skip to content

Commit dd21f40

Browse files
committed
revert to official prebuilt image
1 parent b51811b commit dd21f40

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

mini static page server/Dockerfile

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,9 @@
1-
ARG ALPINE_VERSION=3.18.4
2-
3-
FROM alpine:${ALPINE_VERSION} AS builder
4-
5-
ARG BUSYBOX_VERSION=1.36.1
6-
7-
# Install all dependencies required for compiling busybox
8-
RUN apk add gcc musl-dev make perl
9-
10-
# Download busybox sources
11-
RUN wget https://busybox.net/downloads/busybox-${BUSYBOX_VERSION}.tar.bz2 \
12-
&& tar xf busybox-${BUSYBOX_VERSION}.tar.bz2 \
13-
&& mv /busybox-${BUSYBOX_VERSION} /busybox
14-
15-
WORKDIR /busybox
16-
17-
# Copy the busybox build config (limited to httpd)
18-
COPY .config .
19-
20-
# Compile and install busybox
21-
RUN make && make install
22-
1+
FROM busybox:latest
232
# Create a non-root user to own the files and run our server
243
RUN adduser -D static
254

26-
# Switch to the scratch image
27-
FROM scratch
28-
295
EXPOSE 80
306

31-
# Copy over the user
32-
COPY --from=builder /etc/passwd /etc/passwd
33-
34-
# Copy the busybox static binary
35-
COPY --from=builder /busybox/_install/bin/busybox /
36-
377
# Use our non-root user
388
USER static
399
WORKDIR /home/static
@@ -50,4 +20,4 @@ COPY httpd.conf .
5020
COPY ./html/* .
5121

5222
# Run busybox httpd
53-
CMD ["/busybox", "httpd", "-f", "-v", "-p", "80", "-c", "httpd.conf"]
23+
CMD ["busybox", "httpd", "-f", "-v", "-p", "80", "-c", "httpd.conf"]

0 commit comments

Comments
 (0)