Fix: Update Docker build process to resolve npm install failures
This commit is contained in:
1
.github/workflows/docker-publish.yml
vendored
1
.github/workflows/docker-publish.yml
vendored
@@ -60,6 +60,7 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
NPM_CONFIG_STRICT_SSL=false
|
NPM_CONFIG_STRICT_SSL=false
|
||||||
NPM_CONFIG_REGISTRY=https://registry.npmjs.org/
|
NPM_CONFIG_REGISTRY=https://registry.npmjs.org/
|
||||||
|
NODE_ENV=development
|
||||||
|
|
||||||
publish-npm:
|
publish-npm:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -12,9 +12,12 @@ RUN apk add --no-cache \
|
|||||||
RUN npm config set strict-ssl false
|
RUN npm config set strict-ssl false
|
||||||
RUN npm config set registry https://registry.npmjs.org/
|
RUN npm config set registry https://registry.npmjs.org/
|
||||||
|
|
||||||
# Copy package files and install dependencies
|
# Copy package files
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci
|
|
||||||
|
# Install dependencies with development environment for building
|
||||||
|
ENV NODE_ENV=development
|
||||||
|
RUN npm ci --no-optional --unsafe-perm
|
||||||
|
|
||||||
# Copy source code
|
# Copy source code
|
||||||
COPY . .
|
COPY . .
|
||||||
@@ -22,7 +25,7 @@ COPY . .
|
|||||||
# Build TypeScript code
|
# Build TypeScript code
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Default environment variables
|
# Switch to production for runtime
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
# The API key should be passed at runtime
|
# The API key should be passed at runtime
|
||||||
|
|||||||
Reference in New Issue
Block a user