Run Docker containers like they are native services with Docker so they can be locally accessible to the host computer with their default settings.
- Docker
- Docker-compose
- Nginx Reverse Proxy
- MySQL
- Redis
- Minio
- MongoDB
Download the docker-compose.yaml
file included in this Gist to somewhere on your hard drive. From that
folder run:
docker-compose up -d
This will load all the services listed. To only run select services include the service at the and of the previous command:
docker-compose up -d proxy mysql
Each of the included services has container volume to persist data between system restarts. To remove a volume you will need to stop the service it belongs to then remove the volume. To remove the mysql data volume you would run:
docker-compose stop mysql
docker volume rm mysql-data
To recreate the data volume start the container again.
docker-compose start mysql
You can remove all containers, volumes, and networks created by this file by running:
docker-compose down -v --rmi all
Within the context of this docker-compose.yaml
the command will:
- Stop and remove all services
- Remove the specified network
- Remove all container volumes
- Delete downloaded images for the defined services
If you receive an error that any of the containers, volumes, or networks are currently in use then you will need to stop all containers linking to them and run the command again.
Since the ports used are default to their respective services you could have conflicts with other local instances. You may need to stop or remove those service from the host computer before running service included here.
Add RabbitMQ and MongoDB