Dockerfile fix for esbuild
This commit is contained in:
parent
1cb1c1a333
commit
e3a1a3c064
1 changed files with 3 additions and 4 deletions
|
|
@ -4,14 +4,13 @@ FROM node:18-alpine
|
|||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files, config script, and install dependencies
|
||||
# Copy package files, config script
|
||||
COPY package.json package-lock.json esbuild.config.js ./
|
||||
# Copy application source before build so esbuild can locate entry files
|
||||
COPY . .
|
||||
# Install all dependencies, build with esbuild, then remove devDeps
|
||||
RUN npm ci && npm run build && npm prune --production
|
||||
|
||||
# Copy application source
|
||||
COPY . .
|
||||
|
||||
# Expose the application port
|
||||
EXPOSE 3000
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue