Skip to content

Commit

Permalink
Update README.md
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 Dec 6, 2024
1 parent 5fba30d commit df3fc83
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,20 @@ Inside the `docker-simple-app` folder, create a file named `Dockerfile``. This f
# 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 Expand Up @@ -152,4 +157,4 @@ docker stop <container_id_or_name>
docker ps -a
```
---
---
---

0 comments on commit df3fc83

Please sign in to comment.