-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (18 loc) · 1.11 KB
/
Dockerfile
File metadata and controls
30 lines (18 loc) · 1.11 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
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install -y python-setuptools python-mysqldb python-dev build-essential mariadb-server-5.5 curl libffi-dev libssl-dev
RUN easy_install paste python-slugify jinja2 shortuuid py-bcrypt termcolor simplejson pyyaml pyopenssl
RUN curl https://userify.com/enterprise/userify-ssh-server.tar.gz | tar -zxC /opt/
RUN sed -i "s/^ *exit 0/# exit 0/" /etc/rc.local
RUN echo '/opt/userify-ssh-server/api.py | logger -p local3.info -t userify-ssh-server &' >> /etc/rc.local
ADD userify-ssh.service /usr/lib/systemd/system/userify-ssh.service
RUN groupadd --system userify
RUN useradd --system -s /bin/false userify -g userify
RUN chown -R root:root /opt/userify-ssh-server/
RUN chmod -R 755 /opt/userify-ssh-server/
RUN chmod -R 700 /opt/userify-ssh-server/config.py
RUN cd /opt/userify-ssh-server && ./generate_ssl_key.sh
ADD license.json /opt/userify-ssh-server/license.json
RUN sed -i "s/>> THIS LINE WILL CAUSE AN ERROR. PLEASE DELETE ONLY AFTER MAKING SURE ALL OF THE ABOVE IS CORRECT <<//" /opt/userify-ssh-server/config.py
CMD sleep 15 && /opt/userify-ssh-server/api.py
EXPOSE 443