Browse Source

Update Dockerfile

pull/690/head
Peter Lewis 1 year ago
committed by GitHub
parent
commit
80f619aa1d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      Dockerfile

12
Dockerfile

@ -3,6 +3,10 @@
FROM docker.io/library/node:18-alpine AS build_node_modules FROM docker.io/library/node:18-alpine AS build_node_modules
# Hide fund and update-notifier message
RUN npm config set -g fund false &&\
npm config set -g update-notifier false
# Copy Web UI # Copy Web UI
COPY src/ /app/ COPY src/ /app/
WORKDIR /app WORKDIR /app
@ -11,6 +15,10 @@ RUN npm ci
# This saves a lot of disk space. # This saves a lot of disk space.
FROM docker.io/library/node:18-alpine FROM docker.io/library/node:18-alpine
# Hide fund and update-notifier message
RUN npm config set -g fund false &&\
npm config set -g update-notifier false
COPY --from=build_node_modules /app /app COPY --from=build_node_modules /app /app
# Move node_modules one directory up, so during development # Move node_modules one directory up, so during development
@ -28,9 +36,13 @@ RUN npm i -g nodemon
# Install Linux packages # Install Linux packages
RUN apk add -U --no-cache \ RUN apk add -U --no-cache \
iptables \ iptables \
iptables-legacy \
wireguard-tools \ wireguard-tools \
dumb-init dumb-init
# Symlink iptables
RUN update-alternatives --install /sbin/iptables iptables /sbin/iptables-legacy 10 --slave /sbin/iptables-restore iptables-restore /sbin/iptables-legacy-restore --slave /sbin/iptables-save iptables-save /sbin/iptables-legacy-save
# Expose Ports # Expose Ports
EXPOSE 51820/udp EXPOSE 51820/udp
EXPOSE 51821/tcp EXPOSE 51821/tcp

Loading…
Cancel
Save