-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
99 lines (85 loc) · 2.68 KB
/
Dockerfile
File metadata and controls
99 lines (85 loc) · 2.68 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
FROM php:7.1-cli
MAINTAINER Mickael VILLERS <mickael.villers@epitech.eu>
# Set correct environment variables.
ENV DEBIAN_FRONTEND=noninteractive
ENV HOME /root
# Ubuntu mirrors
RUN apt-get update
# Repo for Yarn
RUN apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
RUN echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# Repo for Node
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
# Install requirements for standard builds.
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
curl \
apt-transport-https \
ca-certificates \
openssh-client \
wget \
bzip2 \
git \
build-essential \
libmcrypt-dev \
libicu-dev \
zlib1g-dev \
libpq-dev \
libmcrypt-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng12-dev \
python-yaml \
python-jinja2 \
python-httplib2 \
python-keyczar \
python-paramiko \
python-setuptools \
python-pkg-resources \
python-pip \
unzip \
rsync \
nodejs \
yarn \
# Standard cleanup
&& apt-get autoremove -y \
&& update-ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
# Install common PHP packages.
&& docker-php-ext-install \
iconv \
mcrypt \
mbstring \
bcmath \
intl \
pdo \
pdo_pgsql \
zip \
# Configure and install PHP GD
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
# install xdebug
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& echo "error_reporting = E_ALL" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "display_startup_errors = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "display_errors = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.idekey=\"PHPSTORM\"" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.remote_port=9001" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
# Composer installation.
&& curl -sS https://getcomposer.org/installer | php \
&& mv composer.phar /usr/bin/composer \
&& composer selfupdate \
# Add fingerprints for common sites.
&& mkdir ~/.ssh \
&& ssh-keyscan -H github.com >> ~/.ssh/known_hosts \
&& ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
# Show versions
RUN php -v \
&& node -v \
&& npm -v \
&& python --version
CMD ["bash"]