-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
55 lines (44 loc) · 1.58 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
FROM alpine:latest
MAINTAINER https://github.com/jolian88
ENV GATEONE_REPO_URL https://github.com/liftoff/GateOne.git
# Ensure everything is up-to-date
RUN apk update
# Install dependencies
RUN apk add --update \
python \
python-dev \
py-pip \
build-base \
git \
dtach \
busybox-extras \
libffi-dev \
readline \
openssh-client && \
rm -rf /var/cache/apk/*
RUN pip install tornado==4.5.3
RUN pip install --upgrade futures cssmin slimit psutil
# Create the necessary directories, clone the repo, and install everything
RUN mkdir -p /gateone/logs && \
mkdir -p /gateone/users && \
mkdir -p /etc/gateone/conf.d && \
mkdir -p /etc/gateone/ssl && \
cd /gateone && \
git clone --depth 1 $GATEONE_REPO_URL && \
cd GateOne && \
python setup.py install && \
cp docker/update_and_run_gateone.py /usr/local/bin/update_and_run_gateone
# Use our own GateOne custom configuration file rather than the one from the cloned repo
COPY 60docker.conf /etc/gateone/conf.d/60docker.conf
# This ensures our configuration files/dirs are created:
RUN gateone --configure \
--log_file_prefix="/gateone/logs/gateone.log"
# Remove the auto-generated key/certificate so that a new one gets created the
# first time the container is started:
RUN rm -f /etc/gateone/ssl/key.pem && \
rm -f /etc/gateone/ssl/certificate.pem \
rm -f /gateone/logs/*
# (We don't want everyone using the same SSL key/certificate)
EXPOSE 8022
ENTRYPOINT ["gateone"]
CMD ["--log_file_prefix=/gateone/logs/gateone.log"]