-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathnode-dockerfile
35 lines (30 loc) · 1.02 KB
/
node-dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM node
# For simplicity, we're keeping this Dockerfile very small.
# From a security perspective, this Dockerfile shouldn't
# be considered "production ready".
ARG NODE_PATH=/home/node/app/
COPY package.json $NODE_PATH
COPY sensitive-file.txt $NODE_PATH
COPY src $NODE_PATH/src
COPY node-dockerfile-wrapper.sh $NODE_PATH
RUN apt-get update && apt-get install -y python3 \
&& cd $NODE_PATH \
&& chown node:node node-dockerfile-wrapper.sh \
&& chmod +x node-dockerfile-wrapper.sh \
&& npm install
CMD ["bash"]
FROM node
# For simplicity, we're keeping this Dockerfile very small.
# From a security perspective, this Dockerfile shouldn't
# be considered "production ready".
ARG NODE_PATH=/home/node/app/
COPY package.json $NODE_PATH
COPY sensitive-file.txt $NODE_PATH
COPY src $NODE_PATH/src
COPY node-dockerfile-wrapper.sh $NODE_PATH
RUN apt-get update && apt-get install -y python3 \
&& cd $NODE_PATH \
&& chown node:node node-dockerfile-wrapper.sh \
&& chmod +x node-dockerfile-wrapper.sh \
&& npm install
CMD ["bash"]