An open API service indexing awesome lists of open source software.

https://github.com/shadowslayer03/docker-commands

A repo acting as a go-to-guide for anyone to start using Docker.
https://github.com/shadowslayer03/docker-commands

Last synced: 5 months ago
JSON representation

A repo acting as a go-to-guide for anyone to start using Docker.

Awesome Lists containing this project

README

          

# Docker Commands
---
### Docker Desktop
A GUI for managing images and containers.

### Docker Hub
A repository to download official, verified, or sponsored images.

### Docker Engine
Responsible for creating and running containers.

### Images
Blueprints for software.

### Containers
Running instances of images.

### Volumes
External storage attached to containers.

### Network
The network component that allows containers to communicate with each other.

### Daemon
A background process also called `dockerd`.

---
### General Commands

1. `docker login` - Log in to your Docker account.
2. `docker logout` - Log out from your Docker account.
3. `docker info` - Get system-wide Docker information.
4. `docker version` - Show the Docker version.
5. `docker help` - Get a list of all Docker commands.

---
## Image and Container Management
---
1. `docker search ` - Search for a Docker image in Docker Hub.

2. `docker pull ` - Get the image locally.

3. `docker images` - View all local images.

4. `docker create ` - Create a new container from an image.

5. `docker ps` - List running containers.

6. `docker ps -a` - List all containers, including exited ones.

7. `docker run ` - Create and run a new container from an image.

8. `docker run -it ` - Run a container in interactive mode. (Note: It's more common to use `docker run -it ` to run an interactive shell inside a container, but `docker run -it ` can be used if the container has a default command to run interactively).

9. `docker run -p : ` - Run an image in a container where `` of the container is exposed at `` on the local device.

10. `docker commit /:` - Create a new custom image from a container with a custom name and tag.

11. `docker cp :` - Copy a file from the local file system to a specified path within a container.

12. `docker exec ` - Execute a command inside a running container.

13. `docker build -t /:` - Build an image from the Dockerfile.

13. `docker start ` - Start an exited container.

14. `docker stop ` - Stop a running container.

15. `docker pause ` - Pause a running container.

16. `docker rm ` - Remove a container.

17. `docker rmi ` - Remove an image.