Skip to content

Commit

Permalink
Merge pull request #25 from abitrolly/single-binary
Browse files Browse the repository at this point in the history
Use standalone busybox_HTTPD binary (-78 kB)
  • Loading branch information
lipanski authored May 5, 2024
2 parents fdf25eb + 6e6225f commit 51e1ce6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ WORKDIR /busybox
# Copy the busybox build config (limited to httpd)
COPY .config .

# Compile and install busybox
RUN make && make install
# Compile
RUN make && ./make_single_applets.sh

# Create a non-root user to own the files and run our server
RUN adduser -D static
Expand All @@ -31,8 +31,8 @@ EXPOSE 3000
# Copy over the user
COPY --from=builder /etc/passwd /etc/passwd

# Copy the busybox static binary
COPY --from=builder /busybox/_install/bin/busybox /
# Copy the static binary
COPY --from=builder /busybox/busybox_HTTPD /busybox_HTTPD

# Use our non-root user
USER static
Expand All @@ -50,4 +50,4 @@ COPY httpd.conf .
# COPY . .

# Run busybox httpd
CMD ["/busybox", "httpd", "-f", "-v", "-p", "3000", "-c", "httpd.conf"]
CMD ["/busybox_HTTPD", "-f", "-v", "-p", "3000", "-c", "httpd.conf"]

0 comments on commit 51e1ce6

Please sign in to comment.