-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_development
48 lines (38 loc) · 1.42 KB
/
Dockerfile_development
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
FROM ubuntu:16.04
MAINTAINER Oscar Fanelli <oscar.fanelli@gmail.com>
# Locale generator
RUN locale-gen en_US.UTF-8
ENV PROJECT_PATH=/var/www \
DEBIAN_FRONTEND=noninteractive \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8 \
PHP_MODS_CONF=/etc/php/7.0/mods-available \
PHP_INI=/etc/php/7.0/cli/php.ini \
TERM=xterm
# Utilities, Apache, PHP, and supplementary programs
RUN apt-get update -q && apt-get upgrade -yqq && apt-get install -yqq --force-yes \
curl \
nano \
git \
php \
php-xdebug
# PHP.ini file: enable <? ?> tags and quiet logging
RUN sed -i "s/short_open_tag = .*/short_open_tag = On/" $PHP_INI && \
sed -i "s/memory_limit = .*/memory_limit = 256M/" $PHP_INI && \
sed -i "s/display_errors = .*/display_errors = On/" $PHP_INI && \
sed -i "s/display_startup_errors = .*/display_startup_errors = On/" $PHP_INI && \
sed -i "s/post_max_size = .*/post_max_size = 64M/" $PHP_INI && \
sed -i "s/upload_max_filesize = .*/upload_max_filesize = 64M/" $PHP_INI && \
sed -i "s/max_file_uploads = .*/max_file_uploads = 100/" $PHP_INI && \
sed -i "s/error_reporting = .*/error_reporting = E_ALL | E_STRICT/" $PHP_INI
# Cleanup
RUN apt-get autoremove -yqq
# Port to expose
EXPOSE 80
# Workdir
WORKDIR $PROJECT_PATH
# Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Make it running
CMD /bin/bash