Useful Docker Commands Snippets and Notes
👤 By webune | 📆
Command to create a conainter:
- Create a docker-compose.yml file in up app root directory
- Create a Dockerfile file in up app root directory
- Build the container:
$ docker-compose build --no-cache app
- Run/start the container:
$ docker-compose up -d app
- Shutdown/stop the container:
$ docker-compose down
Command to remove all docker containers:
Hello everyone, this is a very short and simple snippet page to show the command you can use to remove or delete force all current docker containers and reset your list:
docker rm $(docker ps -a -q)
To view docker running logs in ubuntu command:
docker logs -t -f <APPNAME>
docker-compose logs -f -t >> MYDOCKER_APPNAME.log