Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Dockerfile: build with clean alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
pheiduck committed Dec 18, 2023
1 parent 2b524d5 commit f249b8e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
FROM docker.io/library/node:20-alpine AS build_node_modules
FROM alpine:latest AS build_node_modules

# Hide fund and update-notifier message
RUN npm config set -g fund false &&\
npm config set -g update-notifier false
RUN apk add -U --no-cache \
npm \
nodejs

# Copy Web UI
COPY src/ /app/
WORKDIR /app
RUN npm ci
# Copy build result to a new image.
# This saves a lot of disk space.
FROM docker.io/library/node:20-alpine

# Hide fund and update-notifier message
RUN npm config set -g fund false &&\
npm config set -g update-notifier false
FROM alpine:latest

COPY --from=build_node_modules /app /app

Expand All @@ -32,6 +28,8 @@ RUN npm i -g nodemon

# Install Linux packages
RUN apk add -U --no-cache \
npm \
nodejs \
iptables \
wireguard-tools \
dumb-init
Expand Down

0 comments on commit f249b8e

Please sign in to comment.