Appearance
Docker
Some projects include a docker-compose.yml for local development, so that they can be run using Docker containers rather than directly on your machine. This is especially useful for legacy projects running older versions of PHP.
This page covers the workflow for those projects.
Prerequisites
Install Docker Desktop and ensure the Docker daemon is running before continuing.
Shell aliases
Add these aliases to your shell profile (e.g. ~/.zshrc or ~/.bashrc) to reduce typing for the most common Compose commands:
bash
alias dcu='docker compose up -d'
alias dcd='docker compose kill && docker compose down'Reload your shell after saving:
bash
source ~/.zshrcTIP
If you are using oh-my-zsh, a good place to add aliases is $ZSH_CUSTOM/aliases.zsh.
| Alias | Expands to | Purpose |
|---|---|---|
dcu | docker compose up -d | Start all services in the background |
dcd | docker compose kill && docker compose down | Stop and remove all containers |
Daily workflow
Start services when beginning work:
bash
dcuStop services when done:
bash
dcdTo tail logs for a specific service while working:
bash
docker compose logs -f <service>Private registry
Projects that use our own Docker images pull them from the self-hosted registry at registry.morphserve.net. You need to authenticate once per machine.
Generate a GitLab access token
- Sign in to the GitLab instance.
- Go to User Settings → Access Tokens (top-right avatar menu).
- Create a new token with the read_registry scope. Give it a recognisable name such as
docker-local. - Copy the token – it is only shown once.
Log in to the registry
bash
docker login registry.morphserve.netEnter your GitLab username and paste the access token as the password when prompted. Docker stores the credential in your system keychain so you only need to do this once.
Verify access
Pull any image the project uses to confirm authentication is working:
bash
docker pull registry.morphserve.net/<namespace>/<image>:<tag>If the pull succeeds, you are ready to run the project with dcu.