Command Reference

We included a few commands in the /usr/local/bin directory to help you with your development experience. These commands are available in the serversideup/php image.

Official PHP Docker Commands

Since our images are based off the official PHP Docker images, any commands from the Official PHP Docker images are available in our images. You can find the full list of commands on the official PHP Docker images documentation.

docker-php-serversideup-dep-install-alpine

This command will detect the operating system and install packages if it is an Alpine based system. This is helpful if you're building multiple operating systems from the same Dockerfile.

Example - Installing the `git` package on Alpine

# Usage: docker-php-serversideup-dep-install-alpine [alpine-packages]
docker-php-serversideup-dep-install-alpine git

docker-php-serversideup-dep-install-debian

This command will detect the operating system and install packages if it is a Debian based system. This is helpful if you're building multiple operating systems from the same Dockerfile.

Example - Installing the `git` package on Debian

# Usage: docker-php-serversideup-dep-install-debian [debian-packages]
docker-php-serversideup-dep-install-debian git

docker-php-serversideup-entrypoint

For our images that DO NOT use S6 Overlay, this is our default entrypoint script.

docker-php-serversideup-install-php-ext-installer

This is an internal helper script to shorten up the syntax for the installation of the PHP extension installer.

Example - Installing the PHP extension installer

# Usage: docker-php-serversideup-install-php-ext-installer [version]
docker-php-serversideup-install-php-ext-installer 2.2.0

docker-php-serversideup-set-file-permissions

This command is used to set the file permissions of a service in the container. This is useful for development environments where you want to match the user and group ID of the host machine.

Learn more about working with file permissions →

Example - Setting the file permissions of the NGINX service

# Usage: docker-php-serversideup-set-file-permissions --owner USER:GROUP --service SERVICE
docker-php-serversideup-set-file-permissions --owner 1000:1000 --service nginx

docker-php-serversideup-set-id

This command is used to set the user and group ID of the www-data user in the container. This is useful for development environments where you want to match the user and group ID of the host machine.

Learn more about working with file permissions →

Example - Setting the user and group ID of the `www-data` user

#  docker-php-serversideup-set-id [username] [uid]:[gid]
docker-php-serversideup-set-id www-data 1000:1000

docker-php-serversideup-s6-install

This is a command used at build time to install a specific version of S6 Overlay.

install-php-extensions

This command is a wrapper around the docker-php-ext-install command that comes with the official PHP Docker images. This command allows you to install PHP extensions with a single command.

Check out the docker-php-extension-installer project on GitHub →

Here's an example of how you can use this command:

Example - Installing the "intl" extension

install-php-extensions intl