forked from c0ny1/upload-labs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (26 loc) · 867 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
FROM php:5.5-apache
MAINTAINER c0ny1 <[email protected]>
ENV LC_ALL C.UTF-8
ENV TZ=Asia/Shanghai
COPY ./docker /tmp/
# config apache && php
RUN cp /tmp/docker-php.conf /etc/apache2/conf-available/docker-php.conf &&\
cp /tmp/php.ini /usr/local/etc/php/ &&\
cp /tmp/php.ini /usr/local/etc/php/conf.d/
# install git && php ext
RUN sed -i 's/httpredir.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list &&\
apt-get update && \
apt-get install -y libgd-dev &&\
docker-php-ext-install gd &&\
docker-php-ext-enable gd &&\
docker-php-ext-install exif &&\
docker-php-ext-enable exif &&\
rm -rf /var/lib/apt/lists/*
COPY ./src /tmp/upload-labs
# install upload-labs
RUN cd /tmp/ &&\
rm -rf /var/www/html/* &&\
mv /tmp/upload-labs/* /var/www/html/ &&\
chown www-data:www-data -R /var/www/html/ && \
rm -rf /tmp/*
EXPOSE 80