2023-09-03 21:38:54 +03:00
|
|
|
ARG VARIANT=18-bullseye
|
2022-11-02 09:00:56 +03:00
|
|
|
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT}
|
|
|
|
|
|
|
|
ARG PORT=3000
|
|
|
|
|
|
|
|
# Set Working Directory
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
# Add `/app/node_modules/.bin` to $PATH
|
|
|
|
ENV PATH /app/node_modules/.bin:$PATH
|
|
|
|
ENV CHOKIDAR_USEPOLLING=true
|
|
|
|
ENV FAST_REFRESH=false
|
|
|
|
ENV WATCHPACK_POLLING=true
|
|
|
|
ENV PORT=$PORT
|
|
|
|
|
|
|
|
# Install Application Dependencies
|
|
|
|
COPY package.json ./
|
|
|
|
COPY package-lock.json ./
|
|
|
|
|
2023-09-03 21:38:54 +03:00
|
|
|
# Upgrade NPM
|
|
|
|
RUN npm install npm@latest -g
|
|
|
|
|
2022-11-02 09:00:56 +03:00
|
|
|
RUN npm install
|
|
|
|
RUN chmod 777 node_modules
|
|
|
|
|
|
|
|
# Copy Application Files
|
|
|
|
COPY . ./
|
|
|
|
|
|
|
|
# Expose Port
|
|
|
|
EXPOSE $PORT
|
|
|
|
|
|
|
|
# start app
|
2023-09-03 21:38:54 +03:00
|
|
|
CMD npx vite --host "0.0.0.0" --port $PORT
|