npm run build is not working as expected. so replaced tsc command directly
Added typescript installation command
This commit is contained in:
parent
60bfd8cf1a
commit
155dd55681
@ -3,14 +3,25 @@ FROM node:18-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
|
||||
# Install TypeScript as a dev dependency (if not already installed)
|
||||
RUN npm install typescript --save-dev
|
||||
|
||||
# Copy all application files
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
# Run TypeScript compiler using npx
|
||||
RUN npx tsc --pretty
|
||||
|
||||
# Verify the output directory
|
||||
RUN ls -la dist || echo "No dist folder found"
|
||||
|
||||
# Expose the application port
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["npm", "start"]
|
||||
Loading…
x
Reference in New Issue
Block a user