Crear imagen Apache+PHP
This commit is contained in:
parent
c80b1f10e5
commit
22997d12b8
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
FROM debian:bookworm-slim
|
||||||
|
# Actualizamos
|
||||||
|
RUN apt-get update; apt-get -y upgrade
|
||||||
|
# Instalamos Apache y PHP
|
||||||
|
RUN apt-get -y install apache2
|
||||||
|
RUN apt-get -y install php8.2 php8.2-sqlite3 php8.2-intl php-curl
|
||||||
|
# Ajuste PHP-Curl
|
||||||
|
RUN sed -i 's/;extension=curl/extension=curl/g' /etc/php/8.2/apache2/php.ini
|
||||||
|
# Apache en primer plano
|
||||||
|
COPY httpd-foreground /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/httpd-foreground
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["httpd-foreground"]
|
8
crear-imagen.sh
Executable file
8
crear-imagen.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
echo
|
||||||
|
echo "Creando imagen Docker Apache+PHP 8.2"
|
||||||
|
echo "Imagen basada en Debian 12"
|
||||||
|
echo "La imagen se llamará: 'blog-viajes-opensource'"
|
||||||
|
echo
|
||||||
|
docker build -tag blog-viajes-opensource:latest .
|
||||||
|
echo
|
10
httpd-foreground
Executable file
10
httpd-foreground
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Eliminar PID anteriores
|
||||||
|
rm -f /run/apache2/apache2.pid
|
||||||
|
|
||||||
|
# Leer variables de entorno
|
||||||
|
. /etc/apache2/envvars
|
||||||
|
# Iniciar Apache (permite recibir parametros)
|
||||||
|
exec apache2 -DFOREGROUND "$@"
|
Loading…
x
Reference in New Issue
Block a user