-
Notifications
You must be signed in to change notification settings - Fork 61
/
Dockerfile
74 lines (55 loc) · 1.65 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
62
63
64
65
66
67
68
69
70
71
72
73
74
# Start with empty ubuntu machine
FROM ubuntu:20.04
MAINTAINER Autolab Development Team "[email protected]"
# Setup correct environment variable
ENV HOME /root
# Change to working directory
WORKDIR /opt
# To avoid having a prompt on tzdata setup during installation
ENV DEBIAN_FRONTEND=noninteractive
RUN chmod 1777 /tmp
# Install dependancies
RUN apt-get update && apt-get install -y \
nginx \
curl \
git \
vim \
supervisor \
python3 \
python3-pip \
build-essential \
tcl8.6 \
wget \
libgcrypt20-dev \
zlib1g-dev \
apt-transport-https \
ca-certificates \
lxc \
iptables \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /opt/TangoService/Tango/
# Install Docker from Docker Inc. repositories.
RUN curl -sSL https://get.docker.com/ -o get_docker.sh && sh get_docker.sh
# Install the magic wrapper.
ADD ./wrapdocker /usr/local/bin/wrapdocker
RUN chmod +x /usr/local/bin/wrapdocker
# Define additional metadata for our image.
VOLUME /var/lib/docker
WORKDIR /opt
# Create virtualenv to link dependancies
RUN pip3 install virtualenv && virtualenv .
WORKDIR /opt/TangoService/Tango
# Add in requirements
COPY requirements.txt .
# Install python dependancies
RUN pip3 install -r requirements.txt
# Move all code into Tango directory
COPY . .
RUN mkdir -p volumes
RUN mkdir -p /var/log/docker /var/log/supervisor
# Move custom config file to proper location
RUN cp /opt/TangoService/Tango/deployment/config/nginx.conf /etc/nginx/nginx.conf
RUN cp /opt/TangoService/Tango/deployment/config/supervisord.conf /etc/supervisor/supervisord.conf
# Reload new config scripts
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]