-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
52 lines (44 loc) · 1.48 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
FROM php:fpm
MAINTAINER xjchengo
COPY sources.list /etc/apt/sources.list
# todo: set dns to 114.114.114.114
RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
RUN echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list
ENV NGINX_VERSION 1.9.0-1~jessie
# install utils
RUN apt-get update && \
apt-get install -y ca-certificates \
curl \
git \
nginx \
openssh-server \
redir \
socat \
supervisor \
unzip \
vim && \
rm -rf /var/lib/apt/lists/*
# install php modules
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
&& docker-php-ext-install mcrypt \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
&& docker-php-ext-install mbstring \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install zip
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer
RUN composer global require xjchen/alauda:*@dev -vvv
ENV PATH /root/.composer/vendor/bin:$PATH
COPY config /root/server_config
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY docker-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
WORKDIR /var/www
EXPOSE 80 22
ENTRYPOINT ["/entrypoint.sh"]
CMD ["supervisord"]