#!/bin/bash# Stop all containersdocker stop $(docker ps -a -q)# Delete all containersdocker rm $(docker ps -a -q)# Delete all imagesdocker rmi $(docker images -q) First of all we need to get a list of all containers. We can get it by the command: docker ps -a -q — all and quiet. Now we need toContinue Reading
Tag: Docker
Docker commands for beginners
Docker is a container technology for Linux / MacOS / FreeBSD (and even Windows, but not full support) that allows a developer to package up an application with all of the parts it needs. It can also be called “Docker commands cheat sheet“. List currently running docker containers: docker ps List all docker containers (running andContinue Reading
How to automatically run Docker containers at startup
Docker is a container technology for Linux / MacOS / FreeBSD (and even Windows, but not fully supports) that allows a developer to package up an application with all of the parts it needs. Restart Policies You should add –restart=always argument: docker run –restart=always -d {{ name }} Restart Policies Using the –restart flag. On Docker run you can specifyContinue Reading