Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Bubbles The Dev <152947339+KernFerm@users.noreply.github.com>
  • Loading branch information
KernFerm authored Nov 24, 2024
1 parent c5b09a9 commit cf8b688
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# Use the official Node.js LTS image based on Alpine
FROM node:lts-alpine

# Update apk and explicitly install OpenSSL
RUN apk update && apk add --no-cache openssl
# Set environment variables for production
ENV NODE_ENV=production

# Update apk and explicitly install OpenSSL and other necessary dependencies
RUN apk update && apk add --no-cache openssl bash

# Set working directory inside the container
WORKDIR /app

# Copy package.json and package-lock.json and install dependencies
# Copy package.json and package-lock.json first to leverage Docker cache
COPY package.json package-lock.json ./
RUN npm install --production

# Install dependencies securely
RUN npm ci --only=production

# Copy the rest of the application files
COPY . .
Expand Down

0 comments on commit cf8b688

Please sign in to comment.