Skip to content

Latest commit

 

History

History
74 lines (54 loc) · 1.79 KB

File metadata and controls

74 lines (54 loc) · 1.79 KB

docker-example

Php 7.2 / Apache / Mailhog / MariaDb / Mongo Db / Portainer.

Docker example project by GiandoG17

Useful links

What are we going to create?

Commands

List containers

docker ps

Restart one or more containers

docker restart <container>

Stop running container without removing them.

docker stop <container>

Remove one or more containers

  • -f = force
docker rm <container>

Run a command in a running container

docker exec -ti <container> bash

List images

docker image ls

Builds, (re)creates, starts, and attaches to containers for a service.

  • --build = Build images before starting containers.
  • -d = Detached mode: Run containers in the background, print new container names
docker-compose up

Stops containers and removes containers, networks, volumes, and images created by up.

docker-compose down

Be careful

There are many useful commands to better manage your containers, visit the links above to view the official docker documentation.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.