-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathDockerfile
35 lines (24 loc) · 885 Bytes
/
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
FROM python:3.5
RUN apt-get update && apt-get install -y supervisor tree
# Set the default directory where CMD will execute
WORKDIR /opt/autologin
# Get pip to download and install requirements
# This comes early because requirements rarely change so this step will be cached
COPY requirements.txt requirements.txt
RUN pip install -U pip && \
pip install -r requirements.txt && \
formasaurus init
ADD . /opt/autologin
# Check that we ADD-ed only the required files
RUN tree
# Finish install
RUN python setup.py install
# Expose ports
EXPOSE 8088 8089
# Create the data folder
RUN mkdir -p /var/autologin
VOLUME /var/autologin
# Copy config to set up the database location
COPY autologin/autologin.docker.cfg /etc/autologin.cfg
# Set the default command to execute when creating a new container
CMD autologin-init-db && supervisord -c /opt/autologin/supervisord.conf