This repository contains various Docker images to be used in web softwares.
Starting from 3.20, the production image is almost the same as the official alpine. The timezone is set to UTC.
Versions 3.19 (and below) and 3.20-dev include tools to enhance manual interaction inside the container.
Tools included in the dev version (3.19 and below, 3.20-dev and above):
- zsh with
zsh-autosuggestionsandzsh-syntax-highlightingplugins - Oh My Zsh with a beautiful prompt
- exa modern replacement for
ls
Aliases are already defined to replace ls with exa:
alias ls="exa --icons --group-directories-first"
alias l="exa -aaghl --git --icons --group-directories-first"
alias ll="exa -ghl --git --icons --group-directories-first"
alias lt="exa --tree --level=2 --icons --group-directories-first"Try it:
# Connect as root
docker run --rm -it williarin/alpine:dev
# Connect as current user
docker run --rm -it -u '1000:1000' williarin/alpine:devNote: latest is equivalent to 3.20 and dev is equivalent to 3.20-dev
Images are built once a week at 00:00 on Monday.
All PHP images are based on Alpine Linux 3.20 (williarin/alpine). They come with bash, curl, zip, unzip and widely used PHP extensions.
Installed PHP extensions:
json, ctype, curl, dom, ftp, gd, iconv, intl, mbstring, mysqlnd, openssl, pdo,
pdo_sqlite, pdo_mysql, pdo_pgsql, pear, phar, posix, session, sqlite3, xml,
xmlreader, zip, zlib, opcache, tokenizer, simplexml, xmlwriter, fileinfo, sodium
Additionally, -dev versions come with Xdebug 3, Git and Make.
All the images are pre-built with a user www-data and a group with the same name. Generally there is no need to run containers with root privileges, so we advise the following:
Specify a --user name and set the working directory on docker runs, e.g.:
docker run --user www-data -w /home/www-data --rm williarin/php:8.2-dev bash -c "php -v | grep 'Xdebug'"Confirm it by running:
docker run --user www-data -w /home/www-data --rm williarin/php:8.2-dev bash -c "id ; env"You can easily add PHP extensions using Alpine package manager.
As an example, create a new image with this Dockerfile to add exif extension to PHP:
FROM williarin/php:8.2-fpm
RUN apk add --no-cache \
php8-exif \
;