-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (24 loc) · 1016 Bytes
/
Dockerfile
File metadata and controls
30 lines (24 loc) · 1016 Bytes
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
ENV APP_ROOT /yourls
ENV DEBIAN_FRONTEND noninteractive
RUN mkdir -p ${APP_ROOT} \
&& apt-get update \
&& apt-get install -y curl apache2 supervisor libapache2-mod-php5 php5-mysql \
&& unset DEBIAN_FRONTEND \
&& rm -rf /var/lib/apt/lists/* \
&& curl -L https://github.com/YOURLS/YOURLS/archive/1.7.1.tar.gz | tar -zx -C ${APP_ROOT} --strip-components=1 \
&& php5enmod mysql \
&& echo "ServerName localhost" | tee /etc/apache2/conf-available/fqdn.conf \
&& a2enconf fqdn \
&& a2enmod php5 rewrite
COPY docker/start-yourls.sh /usr/bin/start-yourls.sh
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY docker/vhost.conf /etc/apache2/sites-enabled/000-default.conf
COPY docker/config.php ${APP_ROOT}/user/config.php
COPY docker/migrate.php ${APP_ROOT}/migrate.php
COPY docker/.htaccess ${APP_ROOT}/.htaccess
COPY docker/index.php ${APP_ROOT}/index.php
WORKDIR ${APP_ROOT}
RUN chown -R www-data:www-data ${APP_ROOT}
EXPOSE 80
CMD ["/usr/bin/supervisord"]