/
Dockerfile.dev
36 lines (26 loc) · 944 Bytes
/
Dockerfile.dev
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
FROM jorge07/alpine-php:7.3
ARG USER=root
ARG PASSWORD=root
ARG COMPOSER_VERSION=1.6.3
RUN apk add -U --no-cache \
php7-pear \
openssh \
supervisor \
autoconf \
git \
curl \
wget \
make \
zip \
php7-xdebug@cast \
&& rm -rf /var/cache/apk/* \
&& sed -i s/#PermitRootLogin.*/PermitRootLogin\ yes/ /etc/ssh/sshd_config \
&& echo "${USER}:${PASSWORD}" | chpasswd \
&& ssh-keygen -A \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer --version=${COMPOSER_VERSION} \
&& composer global require "hirak/prestissimo:0.3.7"
ADD devfs /
RUN HOST_IP="$(/sbin/ip route|awk '/default/ { print $3 }')" \
&& sed -i "$ a\xdebug.remote_host=${HOST_IP}" /etc/php7/conf.d/00_xdebug.ini
CMD ["supervisord", "--nodaemon", "--configuration", "/etc/supervisor/conf.d/supervisord.conf"]
EXPOSE 22 9000