Skip to content

Commit

Permalink
Use Alpine base image (#205)
Browse files Browse the repository at this point in the history
wgquick (apparently) depends on bash and openresolv.

Without those packages removing an Interface is impossible and causes an error message to appear in the webui:
- No Bash: exec complains about "bash no such file in $PATH"
- No openresolv: resolvconf -f -d *interface* returns with error 127

Not having a Shell in the container also makes debugging a lot more annoying.

This enables deletion of interfaces in the webui, eases debugging and only adds about 3MB in size.
  • Loading branch information
HPPinata authored Dec 23, 2023
1 parent 1f47075 commit 4a0fcfb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@ RUN echo "Building version '$ENV_BUILD_IDENTIFIER-$ENV_BUILD_VERSION' for platfo
######-
# Here starts the main image
######-
FROM scratch
FROM alpine:3.19

# Install OS-level dependencies
RUN apk add --no-cache bash openresolv

# Setup timezone
ENV TZ=Europe/Vienna

# Import linux stuff from builder.
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/group /etc/group

# Copy binaries
COPY --from=builder /build/dist/wg-portal /app/wg-portal

Expand All @@ -53,4 +51,4 @@ EXPOSE 8888/tcp
VOLUME [ "/app/data", "/app/config" ]

# Command to run the executable
ENTRYPOINT [ "/app/wg-portal" ]
ENTRYPOINT [ "/app/wg-portal" ]

0 comments on commit 4a0fcfb

Please sign in to comment.