forked from dcwangmit01/GateOne
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
61 lines (54 loc) · 2.08 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
############################################################
# Dockerfile that creates a container for running Gate One.
# Inside the container Gate One will run as the 'gateone'
# user and will listen on port 8000. docker run example:
#
# docker run -t --name=gateone -p 443:8000 gateone
#
# That would run Gate One; accessible via port 443 from
# outside the container. It will also run in the foreground
# with pretty-printed log output (so you can see what's
# going on). To run Gate One in the background:
#
# docker run -d --name=gateone -p 443:8000 gateone
#
# You could then stop or start the container like so:
#
# docker stop gateone
# docker start gateone
#
# The script that starts Gate One inside of the container
# performs a 'git pull' and will automatically install the
# latest code whenever it runs. To disable this feature
# simply pass --noupdate when running the container:
#
# docker run -d --name=gateone -p 443:8000 gateone --noupdate
#
# Note that merely stopping & starting the container doesn't
# pull in updates. That will only happen if you 'docker rm'
# the container and start it back up again.
#
############################################################
FROM python:2.7-alpine
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8
COPY docker/requirements.txt /tmp/requirements.txt
RUN mkdir -p /gateone/logs /gateone/users \
/etc/gateone/conf.d /etc/gateone/ssl
COPY docker/60docker.conf /etc/gateone/conf.d/60docker.conf
#made transactional to clear up after compiling
RUN apk add --update --no-cache g++ linux-headers \
openssh-client openssl git && \
pip install -r /tmp/requirements.txt && \
cd /gateone && \
git clone --depth=1 https://github.com/xykonur/gateone.git GateOne-master && \
cd GateOne-master && \
python setup.py install && \
/usr/local/bin/gateone --configure \
--log_file_prefix="/gateone/logs/gateone.log" && \
cd /etc/gateone/ssl && \
rm -f key.pem certificate.pem && \
apk del g++ linux-headers git && \
rm -rf /gateone/GateOne-master
EXPOSE 8000
ENTRYPOINT ["/usr/local/bin/gateone"]