-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (37 loc) · 1.37 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
# syndicate-reverseproxy
#
# VERSION 1.0
FROM ubuntu:14.04
MAINTAINER Illyoung Choi <[email protected]>
##############################################
# Setup a Syndicate account
##############################################
ENV HOME /home/syndicate
RUN useradd syndicate && echo 'syndicate:syndicate' | chpasswd && \
echo "syndicate ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
mkdir /home/syndicate && \
chown -R syndicate:syndicate $HOME
ENV USER syndicate
WORKDIR $HOME
##############################################
# Setup packages
##############################################
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y --allow-unauthenticated --no-install-recommends \
wget python-pip build-essential \
python python-dev python-pip \
nginx && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt /var/lib/cache /var/lib/log && \
pip install -v -v greenlet gevent==1.2.2 grequests
COPY start_nginx.sh /usr/bin/
COPY nginx.conf /etc/nginx/
COPY sdm_reverseproxy.conf.template /tmp/sdm_reverseproxy.conf.template
COPY origin_server_setter.py /usr/bin/
COPY configure_nginx.py /usr/bin/
RUN chmod 777 /usr/bin/start_nginx.sh && \
chmod 755 /usr/bin/origin_server_setter.py && \
chmod 755 /usr/bin/configure_nginx.py
EXPOSE 31010/tcp
CMD bash -C '/usr/bin/start_nginx.sh'