Some of my personal, frequently used docker environments for development. This does not follow the traditional structure of containerizing every app that I work on, but it gives me all of the necessary environments to work on any project I want locally. Feel free to fork this and add/remove whatever containers you want. There are default configs for a basic web server and databases.
There is a directory called projects/code, feel free to put your code in there so it syncs up with the containers.
- nginx latest
- php-fpm/php 8.1
- MySQL latest
- Redis latest
-
Make sure Docker/Docker-CE is installed.
-
Next, set up any necessary conf.d files for your project in
nginx/conf.d/
. These will be used when the container is being built. You may choose to use the templates that are in there for laravel projects, or use something else. -
Once you have your hostnames, copy and paste the
hosts.example.txt
file to a normalhosts.txt
file, and put them in there line by line. -
Once everything is set up, run
make build
to build your docker compose environment. Everything will be set up for you.