-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (41 loc) · 1.15 KB
/
Dockerfile
File metadata and controls
50 lines (41 loc) · 1.15 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
FROM mcr.microsoft.com/oryx/python:3.6-20191018.1
LABEL maintainer="appsvc-images@microsoft.com"
# Web Site Home
ENV HOME_SITE "/home/site/wwwroot"
#Install system dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
openssh-server \
vim \
curl \
wget \
tcptraceroute \
net-tools \
dnsutils \
tcpdump \
iproute2 \
&& pip install --upgrade pip \
&& pip install subprocess32 \
&& pip install gunicorn \
&& pip install virtualenv \
&& pip install flask
WORKDIR ${HOME_SITE}
EXPOSE 8000
ENV PORT 8000
ENV SSH_PORT 2222
# setup SSH
RUN mkdir -p /home/LogFiles \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /root/.bashrc
COPY sshd_config /etc/ssh/
RUN mkdir -p /opt/startup
COPY init_container.sh /opt/startup/init_container.sh
# setup default site
RUN mkdir /opt/defaultsite
COPY hostingstart.html /opt/defaultsite
COPY hostingstart_dep.html /opt/defaultsite
COPY application.py /opt/defaultsite
# configure startup
RUN chmod -R 777 /opt/startup
COPY entrypoint.py /usr/local/bin
ENTRYPOINT ["/opt/startup/init_container.sh"]