forked from guifre/notes
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker.txt
More file actions
31 lines (22 loc) · 736 Bytes
/
docker.txt
File metadata and controls
31 lines (22 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
*Docker*
Basic Docker Commands
List all available images
*$ docker images*
List all the running containers
*$ docker ps*
Run a command within the container
*$ docker exec -ti [container_name/container_id] /bin/bash*
Run an image
*$ docker run -t [image_name] .*
Run an image and get a shell bash
*$ docker run -ti [container_name/container_id] /bin/bash*
Stop a container
*$ docker stop/kill [container_name]*
Show logs
*$ docker logs [container]*
Build an image
*$ docker build -t [image_name] .*
Push image to registry
*$ docker push -t [registry/image_name:version]*
Pull an image from registry
*$ docker pull -t [registry/image_name:version]*