File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM node:16-slim
2- WORKDIR /app
3- COPY package.json package-lock.json ./
4- RUN npm install
1+ # Use an official image as a parent image
2+ FROM node:14
3+
4+ # Set the working directory
5+ WORKDIR /usr/src/app
6+
7+ # Copy the current directory contents into the container at /usr/src/app
58COPY . .
6- CMD ["node", "app.js"]
9+
10+ # Install any needed packages specified in package.json
11+ RUN npm install
12+
13+ # Make port 8080 available to the world outside this container
14+ EXPOSE 8080
15+
16+ # Define environment variable
17+ ENV NODE_ENV=production
18+
19+ # Run app when the container launches
20+ CMD ["npm", "start"]
21+ # Use an official Python runtime as a parent image
22+ FROM python:3.9-slim
23+
24+ # Set the working directory in the container
25+ WORKDIR /app
26+
27+ # Copy the current directory contents into the container at /app
28+ ADD . /app
29+
30+ # Install any needed packages specified in requirements.txt
31+ RUN pip install --no-cache-dir -r requirements.txt
32+
33+ # Make port 80 available to the world outside this container
34+ EXPOSE 80
35+
36+ # Define environment variable
37+ ENV NAME World
38+
39+ # Run app.py when the container launches
40+ CMD ["python", "app.py"]
You can’t perform that action at this time.
0 commit comments