-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (36 loc) · 1.33 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
41
42
43
44
45
FROM php:apache
# Instalar dependencias
RUN apt-get update && apt-get install -y \
libicu-dev \
libpq-dev \
libzip-dev \
unzip \
&& rm -r /var/lib/apt/lists/* \
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
&& docker-php-ext-install \
intl \
pcntl \
pdo_mysql \
pdo_pgsql \
pgsql \
zip \
opcache \
mysqli
# Usar la configuracion por defecto de PHP
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# Copia los archivos de Laravel y configuracion
COPY ./ /var/www/html/
# Mover archivo de configuracion de memoria de PHP
RUN mv "/var/www/html/php-memory.ini" "$PHP_INI_DIR/conf.d/docker-php-memory.ini"
# Use the PORT environment variable in Apache configuration files.
# RUN sed -i 's/80/${PORT}/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
# Configurar Cabeceras de Apache
RUN a2enmod headers
# Mover archivo de configuracion de sitio de Apache-Laravel
RUN mv "/var/www/html/laravel-site.conf" "/etc/apache2/sites-available/laravel.conf"
RUN a2dissite 000-default.conf && a2ensite laravel.conf && a2enmod rewrite
RUN service apache2 restart
# Change uid and gid of apache to docker user uid/gid
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
# Establecer directorio de trabajo
WORKDIR /var/www/html/