Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an example Dockerfile using Debian #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions php72-apache2/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
FROM debian:bullseye-slim

RUN apt clean && apt autoclean && apt update

# Install Apache2 and all other packages we need
RUN apt install -y apache2 \
curl \
wget \
gnupg \
libpng16-16 \
libjpeg62-turbo \
libfreetype6 \
libgmp-dev \
libicu-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
lsb-release

# Add the Sury PHP Repo and install PHP
RUN echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list; \
wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add -; \
apt update
RUN apt install -y php7.2 \
php7.2-gd \
php7.2-mysql \
php7.2-opcache \
php7.2-intl \
php7.2-gmp \
php7.2-apcu \
php7.2-apcu-bc

# Cleanup
RUN apt -y remove libgmp-dev \
libicu-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev && \
apt autoremove -y && \
apt clean && \
apt autoclean && \
rm -rf /var/lib/apt/lists/*

# Enable the Apache2 modules we need
RUN a2enmod php7.2 rewrite headers expires proxy_fcgi

# Set the default workdir
WORKDIR /var/www/html

# Copy the startup script
COPY ./bin/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# Default port to listen on
EXPOSE 80

# Start Apache
ENTRYPOINT ["/entrypoint.sh"]
CMD ["apache2-foreground"]
59 changes: 59 additions & 0 deletions php82-apache2/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
FROM debian:bullseye-slim

RUN apt clean && apt autoclean && apt update

# Install Apache2 and all other packages we need
RUN apt install -y apache2 \
curl \
wget \
gnupg \
libpng16-16 \
libjpeg62-turbo \
libfreetype6 \
libgmp-dev \
libicu-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
lsb-release

# Add the Sury PHP Repo and install PHP
RUN echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list; \
wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add -; \
apt update
RUN apt install -y php8.2 \
php8.2-gd \
php8.2-mysql \
php8.2-opcache \
php8.2-intl \
php8.2-gmp \
php8.2-apcu \
php8.2-apcu-bc

# Cleanup
RUN apt -y remove libgmp-dev \
libicu-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev && \
apt autoremove -y && \
apt clean && \
apt autoclean && \
rm -rf /var/lib/apt/lists/*

# Enable the Apache2 modules we need
RUN a2enmod php8.2 rewrite headers expires proxy_fcgi

# Set the default workdir
WORKDIR /var/www/html

# Copy the startup script
COPY ./bin/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# Default port to listen on
EXPOSE 80

# Start Apache
ENTRYPOINT ["/entrypoint.sh"]
CMD ["apache2-foreground"]