first running configuration
This commit is contained in:
52
Dockerfile
Normal file
52
Dockerfile
Normal file
@ -0,0 +1,52 @@
|
||||
########## Original Dockerfile ##########
|
||||
FROM node:18
|
||||
|
||||
# Install basic development tools
|
||||
RUN apt update && apt install -y less man-db sudo
|
||||
|
||||
# Ensure default `node` user has access to `sudo`
|
||||
ARG USERNAME=node
|
||||
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
|
||||
&& chmod 0440 /etc/sudoers.d/$USERNAME
|
||||
|
||||
# Set `DEVCONTAINER` environment variable to help with orientation
|
||||
ENV DEVCONTAINER=true
|
||||
|
||||
|
||||
########## Modified Dockerfile ##########
|
||||
|
||||
FROM node:18-alpine
|
||||
|
||||
## Install basic development tools
|
||||
#RUN apt update && apt install -y less man-db sudo
|
||||
|
||||
# # Ensure default `node` user has access to `sudo`
|
||||
# ARG USERNAME=node
|
||||
# RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
|
||||
# && chmod 0440 /etc/sudoers.d/$USERNAME
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json
|
||||
COPY package*.json ./
|
||||
|
||||
|
||||
#RUN apt-get update && apt-get install -y git
|
||||
#RUN git config --global user.name "Dobromir Popov"
|
||||
#RUN git config --global user.email "d-popov@abv.bg"
|
||||
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install ws express request #--only=production
|
||||
|
||||
# Copy the rest of the application files
|
||||
COPY . .
|
||||
|
||||
# Start the application
|
||||
#CMD ["npm", "start"]
|
||||
CMD npm start
|
||||
|
||||
EXPOSE 8080 8081
|
||||
|
||||
# Set `DEVCONTAINER` environment variable to help with orientation
|
||||
ENV DEVCONTAINER=true
|
Reference in New Issue
Block a user