Maintenance & Upgrades
Keeping Laradock current, and keeping your own customizations tracked alongside it.
Update Laradock
A Laradock update is just newer commits on master: new services, version bumps, and fixes. To pull them into your project:
- Pull the latest:
git pull origin master(orgit submodule update --remoteif you run Laradock as a submodule). - Rebuild so image changes take effect:
./laradock rebuild(ordocker compose build). - Start again:
./laradock start(ordocker compose up -d).
After a big update, skim your .env against the refreshed .env.example, new services occasionally add new variables. Your .env always wins, so nothing is overwritten; you're only checking for options worth turning on.
Track your own changes
To keep your Laradock customizations under version control while still pulling upstream updates:
- Fork the Laradock repository.
- Use your fork as a submodule inside your project.
- Commit your changes to your fork.
- Pull from the upstream repository periodically to stay current.
Upgrading from a very old Laradock
Only relevant if you're coming from a pre-Docker-Desktop setup (Docker Toolbox / VirtualBox) or Laradock v3:
- Stop the old Docker VM:
docker-machine stop {default}. - Install Docker Desktop for Mac or Windows.
- Update Laradock:
git pull origin master. - Use Laradock as usual:
./laradock start nginx mysql(ordocker compose up -d nginx mysql).
If the last step fails, rebuild everything with ./laradock rebuild --no-cache (or docker compose build --no-cache). Warning: container data might be lost, back it up first.