-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (29 loc) · 1.18 KB
/
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
35
36
37
38
39
40
FROM php:8.2.11-cli
MAINTAINER Jose Ruzafa Sierra <[email protected]>
## Reconfigure timezones
ENV TZ=Europe/Madrid
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN dpkg-reconfigure -f noninteractive tzdata
RUN apt-get update && apt-get install -y \
git \
zip \
unzip
## Install Xdebug
RUN echo "Install xdebug by pecl"
RUN yes | pecl install xdebug-3.2.0 \
&& docker-php-ext-enable xdebug \
&& echo "xdebug.mode=debug\n" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.idekey=PHPSTORM\n" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.discover_client_host=0\n" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
# Change TimeZone
RUN echo "Europe/Madrid" > /etc/timezone
#TOOLS
# Install composer globally
RUN echo "Install composer globally"
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
# RUN composer --no-interaction global require 'hirak/prestissimo'
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY src/ /var/www
COPY vendor/ /var/www
WORKDIR /var/www
CMD ['composer install']