1
0
Fork 0
mirror of https://github.com/docker/awesome-compose.git synced 2025-04-20 07:48:06 +02:00
This commit is contained in:
Eric Wagner 2023-03-13 16:11:58 -04:00
parent 3001c951ac
commit 8611e1753e

View file

@ -2,23 +2,44 @@
To run these examples, we need a newer version of docker compose.
Here is what we are doing:
```bash
docker run --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \ #bind mounts a volume. This mounts the docker.sock on your VM to the docker.sock in the container
--volume "$PWD:$PWD" \ # this bind mounts the current path, to the working directory in docker compose container
--workdir="$PWD" \ #sets the working directory to the default path in the container
docker/compose \ # the image we are running. the container we pulled down with docker pull
-f docker-compose.yml \ # This is within the container. Telling the process to use the docker-compose.yaml file we gave it
docker-compose:latest \ # the image we are running. the container we pulled down with docker pull
up
```
```bash
docker run --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$PWD:$PWD" \
--workdir="$PWD" \
docker/compose \
-f docker-compose.yml \
up
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$PWD:$PWD" \
-w="$PWD" \
lscr.io/linuxserver/docker-compose:latest \
up
```
## these apps work
The way they built the nginx apps seems to be breaking our docker compose solution
here is a list of ones that works:
- wordpress
- promotheuas/ grafana
- postgresql/ pgadmin
- plex
## some things to try
You will need to open two terminals. I could not figure out a way to stop a container with opening a second terminal.
- docker stop <container name>
- docker rm -f <container name>
- docker logs <container name>
- docker exec -it <container name>
- docker ps