-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 844 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (24 loc) · 844 Bytes
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
FROM php:7.4
ARG DEFAULT_APP_DIR=/var/www/http-smoke-test-crawler
ARG BUILD_ENV=production
USER root
RUN apt-get update && apt-get install -y vim nano less
RUN cd /usr/local/etc/php/conf.d/ && \
echo 'memory_limit = -1' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini
COPY . $DEFAULT_APP_DIR
RUN chgrp -R www-data $DEFAULT_APP_DIR
RUN chmod -R 775 $DEFAULT_APP_DIR/public
RUN chmod -R 775 $DEFAULT_APP_DIR/var/log
RUN if [ "$BUILD_ENV" = "local" ] ; \
then \
pecl install xdebug-3.0.4 && docker-php-ext-enable xdebug ; \
printf 'xdebug.mode=debug\n\
xdebug.start_with_request=trigger\n\
xdebug.client_port=9003\n\
xdebug.discover_client_host=true\n\
xdebug.max_nesting_level=512' \
>> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini ; \
fi
WORKDIR $DEFAULT_APP_DIR
STOPSIGNAL SIGTERM
CMD ["php"]