Skip to content

Commit b82afe3

Browse files
authored
Update dockerfile (NomicFoundation#2108)
Dargon789/template-ethereum-contracts@1f5a8a0 Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
1 parent 6b95a81 commit b82afe3

1 file changed

Lines changed: 39 additions & 5 deletions

File tree

dockerfile

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,40 @@
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
58
COPY . .
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"]

0 commit comments

Comments
 (0)