-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
65 lines (52 loc) · 1.8 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM nginx
RUN mkdir -p /home/LogFiles /opt/startup /home/site/wwwroot \
&& 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 \
nano
ARG IMAGE_VERSION=unknown
ENV VITE_VERSION=$IMAGE_VERSION
LABEL maintainer="Microsoft" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.url="https://github.com/microsoft/developer-platform-website" \
org.opencontainers.image.source="https://github.com/microsoft/developer-platform-website" \
org.opencontainers.image.version=$IMAGE_VERSION \
org.opencontainers.image.vendor="Microsoft" \
org.opencontainers.image.title="Developer Platform Website" \
org.opencontainers.image.description="The Microsoft Developer Platform Web." \
org.opencontainers.image.documentation="https://github.com/microsoft/developer-platform-website" \
org.opencontainers.image.licenses="MIT"
# setup default site
RUN rm -f /etc/ssh/sshd_config
COPY deploy/startup /opt/startup
COPY dist /home/site/wwwroot
# setup SSH
COPY deploy/sshd_config /etc/ssh/
RUN mkdir -p /home/LogFiles \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /root/.bashrc
RUN mkdir -p /var/run/sshd
RUN chmod -R +x /opt/startup
ENV PORT 8080
ENV SSH_PORT 2222
EXPOSE 2222 8080
ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance
ENV WEBSITE_INSTANCE_ID localInstance
ENV PATH ${PATH}:/home/site/wwwroot
WORKDIR /home/site/wwwroot
COPY deploy/msdsite /etc/nginx/sites-available/msdsite
COPY deploy/nginx.conf /etc/nginx/nginx.conf
RUN mkdir /etc/nginx/sites-enabled
ENTRYPOINT ["/opt/startup/init_container.sh"]