forked from CSAILVision/LabelMeAnnotationTool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (35 loc) · 1.17 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
FROM ubuntu:16.04
# update ubuntu config
RUN apt-get update -y
RUN DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
# install dependencies for labelme
RUN apt-get install -y \
apache2 \
git \
libapache2-mod-perl2 \
libcgi-session-perl \
libapache2-mod-php \
make \
php
# Throws error
#RUN apt-get install php5 libapache2-mod-php5 -y
# Config apache
RUN a2enmod include
RUN a2enmod rewrite
RUN a2enmod cgi
# apache2 configuration: enabling SSI and perl/CGI scripts
COPY DockerFiles/ubuntu_16.04/000-default.conf /etc/apache2/sites-available/000-default.conf
COPY DockerFiles/ubuntu_16.04/apache2.conf /etc/apache2/apache2.conf
# Copy the repo inside the image and make
RUN mkdir /LabelMeAnnotationTool
ADD . /LabelMeAnnotationTool/
RUN ln -s /LabelMeAnnotationTool/ /var/www/html/LabelMeAnnotationTool
RUN cd /var/www/html/LabelMeAnnotationTool/ && make
RUN chown -R www-data:www-data /var/www/html
# port binding
EXPOSE 80
# Assign volumes
VOLUME /LabelMeAnnotationTool/Images
VOLUME /LabelMeAnnotationTool/Annotations
# run
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]