Docker Container
Docker containers are lightweight, standalone, executable packages that include everything needed to run a piece of software, including the code, a runtime, libraries, environment variables, and system tools. Containers isolate software from its environment and ensure that it works uniformly despite differences for instance between development and staging.
Downloading Images from Docker Hub
To download images from Docker Hub, use the docker pull
a command followed by the name of the image. For common images like Ubuntu, MySQL, or Nginx, the command structure is as follows:
For Ubuntu:
docker pull ubuntu
For MySQL:
docker pull mysql
For nginx:
docker pull nginx
Make sure Docker is installed and running on your system before executing these commands. This will fetch the latest version of the specified image from Docker Hub to your local machine.
Here example I am pulling Ubuntu
Check Docker Images
docker images
docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
docker run -d ubuntu
docker ps -a
docker diff container_name/container_id
docker inspect container_name/container_id
docker stats container_name/container_id
Last updated