Skip to content

Instantly share code, notes, and snippets.

@toriato
Last active October 20, 2024 03:39
Show Gist options
  • Save toriato/54e4b6862628cdfeab805d098476c5af to your computer and use it in GitHub Desktop.
Save toriato/54e4b6862628cdfeab805d098476c5af to your computer and use it in GitHub Desktop.
Podman quadlet example

Podman quadlet example

FROM php:8.2-fpm-alpine
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions \
apcu bcmath bz2 ldap pdo_mysql pdo_pgsql exif sysvsem smbclient intl imap pcntl soap imagick gmp gd zip
[Build]
ImageTag=localhost/php-fpm
File=./php-fpm/build/Containerfile
SetWorkingDirectory=unit
[Unit]
Description=A popular general-purpose scripting language that is especially suited to web development
[Service]
Restart=always
TimeoutStartSec=900
[Container]
Image=php-fpm.build
Exec=php-fpm -R
AutoUpdate=local
Network=some.network
PublishPort=127.10.1.1:9000-9100:9000-9100/tcp
Volume=/run/mysqld:/run/mysqld
# relative path is based on ~/.config/containers/systemd
# e.g. ./php-fpm = ~/.config/containers/systemd/php-fpm
Volume=./php-fpm/config/php:/usr/local/etc/php:ro
Volume=./php-fpm/config/php-fpm.d:/usr/local/etc/php-fpm.d:ro
Volume=./php-fpm/config/php-fpm.conf:/usr/local/etc/php-fpm.conf:ro
# nginx
Volume=/var/www:/var/www
[Install]
WantedBy=default.target
[Network]
Subnet=172.16.0.0/24
Gateway=172.16.0.1
IPRange=172.16.0.0/24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment