-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (44 loc) · 1.26 KB
/
Dockerfile
File metadata and controls
53 lines (44 loc) · 1.26 KB
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
45
46
47
48
49
50
51
52
53
FROM mcr.microsoft.com/oryx/node:10.10-20191018.1
LABEL maintainer="Azure App Services Container Images <appsvc-images@microsoft.com>"
RUN echo "ipv6" >> /etc/modules
RUN npm install -g pm2 \
&& mkdir -p /home/LogFiles /opt/startup \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc \
&& apt-get update \
&& apt-get install --yes --no-install-recommends \
openssh-server \
vim \
curl \
wget \
tcptraceroute \
openrc \
yarn \
net-tools \
dnsutils \
tcpdump \
iproute2
# setup default site
RUN rm -f /etc/ssh/sshd_config
COPY startup /opt/startup
COPY hostingstart.html /opt/startup
# configure startup
RUN mkdir -p /tmp
COPY sshd_config /etc/ssh/
COPY ssh_setup.sh /tmp
RUN chmod -R +x /opt/startup \
&& chmod -R +x /tmp/ssh_setup.sh \
&& (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \
&& rm -rf /tmp/* \
&& echo "cd /home" >> /root/.bashrc \
&& cd /opt/startup \
&& npm install
ENV PORT 8080
ENV SSH_PORT 2222
EXPOSE 2222 8080
ENV PM2HOME /pm2home
ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance
ENV WEBSITE_INSTANCE_ID localInstance
ENV PATH ${PATH}:/home/site/wwwroot
WORKDIR /home/site/wwwroot
ENTRYPOINT ["/opt/startup/init_container.sh"]