-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (32 loc) · 1.05 KB
/
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
36
37
38
39
40
41
42
43
44
FROM node:11.7.0-stretch
# Create app directory
WORKDIR /usr/src/app
COPY startup /opt/startup
# Install Tools - nscd is a DNS Cache
RUN apt-get update \
&& apt-get install -y net-tools nano openssh-server vim curl wget tcptraceroute nscd tcpdump
RUN mkdir -p /usr/src/app \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /usr/src/app" >> /etc/bash.bashrc \
&& cd /opt/startup \
&& npm install \
&& chmod 755 /opt/startup/init_container.sh
COPY sshd_config /etc/ssh/
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm install --only=production
# Bundle app source
COPY . .
EXPOSE 3000
ENV PORT 3000
ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance
ENV WEBSITE_INSTANCE_ID localInstance
ENV PATH ${PATH}:/usr/src/app
ENV APP_HOME "/usr/src/app"
ENV HTTPD_LOG_DIR "/usr/src/app/LogFiles"
# CMD [ "npm", "start" ]
ENTRYPOINT ["/opt/startup/init_container.sh"]