-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathweb-dev.Dockerfile
34 lines (30 loc) · 1.15 KB
/
web-dev.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
# based on web.Dcokerfile build image
FROM specs-website-web:latest
USER 0:0
RUN apt-get update -qy \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qy \
wget curl \
&& docker-php-source extract \
&& pecl install xdebug-3.1.0 \
&& docker-php-ext-enable xdebug \
&& docker-php-source delete \
&& apt-get autoremove -qy \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/log/apt/*
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" \
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.discover_client_host=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
ENV APP_SYSTEM=development
EXPOSE 9003
VOLUME /data/website
ARG user=guest
ARG group=guests
ARG uid=1000
ARG gid=1000
RUN groupadd -g ${gid} ${group} \
&& useradd -u ${uid} -g ${group} -s /bin/sh -m ${user} \
&& usermod -a -G ${group} www-data \
&& usermod -a -G www-data ${user}
USER 33:33