Refactor VPN proxy client implementation
This commit is contained in:
+14
-3
@@ -1,9 +1,21 @@
|
||||
ARG NODE_BUILD_IMAGE=node:20.19-alpine
|
||||
ARG BASE_IMAGE=debian:bookworm-slim
|
||||
|
||||
FROM ${NODE_BUILD_IMAGE} AS build
|
||||
WORKDIR /src
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY index.html vite.config.ts tsconfig*.json ./
|
||||
COPY src/web ./src/web
|
||||
COPY src/server ./src/server
|
||||
COPY src/shared ./src/shared
|
||||
COPY monitoring/grafana/harbor-gateway.json ./monitoring/grafana/harbor-gateway.json
|
||||
RUN npm run build:production
|
||||
|
||||
FROM ${BASE_IMAGE}
|
||||
ARG SINGBOX_VERSION=1.12.13
|
||||
ARG INSTALL_RUNTIME_DEPS=true
|
||||
ARG INSTALL_SINGBOX=true
|
||||
COPY dist /app/dist
|
||||
|
||||
RUN if [ "${INSTALL_RUNTIME_DEPS}" = "true" ]; then \
|
||||
apt-get update \
|
||||
@@ -33,9 +45,8 @@ RUN if [ "${INSTALL_SINGBOX}" = "true" ]; then \
|
||||
fi
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /src/dist /app/dist
|
||||
COPY package.json /app/package.json
|
||||
COPY src/server /app/src/server
|
||||
COPY src/shared /app/src/shared
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
RUN chmod +x /entrypoint.sh \
|
||||
|
||||
Reference in New Issue
Block a user