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: |
|
||||
NPM_CONFIG_STRICT_SSL=false
|
||||
NPM_CONFIG_REGISTRY=https://registry.npmjs.org/
|
||||
NODE_ENV=development
|
||||
|
||||
publish-npm:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -12,9 +12,12 @@ RUN apk add --no-cache \
|
||||
RUN npm config set strict-ssl false
|
||||
RUN npm config set registry https://registry.npmjs.org/
|
||||
|
||||
# Copy package files and install dependencies
|
||||
# Copy package files
|
||||
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 . .
|
||||
@@ -22,7 +25,7 @@ COPY . .
|
||||
# Build TypeScript code
|
||||
RUN npm run build
|
||||
|
||||
# Default environment variables
|
||||
# Switch to production for runtime
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# The API key should be passed at runtime
|
||||
|
||||
Reference in New Issue
Block a user