🐳 Updated Dockerfile

This commit is contained in:
2025-02-25 16:35:39 -05:00
parent 338a46224d
commit 9c5fb93d5b
2 changed files with 25 additions and 12 deletions

View File

@@ -1,23 +1,36 @@
FROM node:18.15.0-alpine
# Use Node.js 22 as the base image
FROM node:22-alpine
LABEL maintainer="Rishi Ghan <rishi.ghan@gmail.com>"
# Set the working directory inside the container
WORKDIR /threetwo
# Copy package.json and lock file first to leverage Docker cache
COPY package.json ./
COPY yarn.lock ./
# Copy package.json and yarn.lock to leverage Docker cache
COPY package.json yarn.lock ./
# Install build dependencies necessary for native modules
RUN apk --no-cache add g++ make libpng-dev git python3 autoconf automake libjpeg-turbo-dev mesa-dev mesa libxi build-base gcc libtool nasm
# Install build dependencies necessary for native modules (for node-sass)
RUN apk --no-cache add \
g++ \
make \
python3 \
autoconf \
automake \
libtool \
nasm \
git
# Install node modules
RUN yarn install --ignore-engines
# Explicitly install sass
RUN yarn add -D sass
# Copy the rest of the application
# Copy the rest of the application files into the container
COPY . .
# Expose the application port (default for Vite)
EXPOSE 5173
# Use yarn start if you want to stick with yarn, or change to npm start if you prefer npm
ENTRYPOINT [ "yarn", "start" ]
# Start the application with yarn
ENTRYPOINT ["yarn", "start"]

View File

@@ -4373,9 +4373,9 @@ camelize@^1.0.0:
integrity sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==
caniuse-lite@^1.0.30001565, caniuse-lite@^1.0.30001578:
version "1.0.30001580"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001580.tgz#e3c76bc6fe020d9007647044278954ff8cd17d1e"
integrity sha512-mtj5ur2FFPZcCEpXFy8ADXbDACuNFXg6mxVDqp7tqooX6l3zwm+d8EPoeOSIFRDvHs8qu7/SLFOGniULkcH2iA==
version "1.0.30001700"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz"
integrity sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ==
catharsis@^0.9.0:
version "0.9.0"