Docker
====================================================================================
Installation
Install Docker CE (Community Edition)
apt install docker.io
====================================================================================
Commands & Usage
------------------------------------------------------------------------------------------------------------------------------------------------
Managing Containers
List Docker processes/containers (running and stopped)
docker ps -a
Start a container
docker start containername
stop a container
docker stop containername
Delete a container
docker rm containername
Check container performance metrics
docker stats containername
------------------------------------------------------------------------------------------------------------------------------------------------
Adding new docker images
Docker has their own 'marketplace' of sorts for docker images:
You can attempt to retrieve
Retrieve and start a docker image using the below command:
docker run container-name
There are lots and lots of options available for the docker run command:
To install a new docker image
docker pull container-name
List installed Docker images
docker images
Search locally installed images, and search Docker repository for available images
docker search name
------------------------------------------------------------------------------------------------------------------------------------------------
Launching Containers
====================================================================================
Basic launch for a container based on an image
docker run --name containername -it imagename
Starting an instance with this method will push your shell into the container itself. To exit the container (continues running):
ctrl+p ctrl+x
To connect to a docker image:
docker attach containername
====================================================================================
====================================================================================