-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdockerbasics
More file actions
33 lines (23 loc) · 877 Bytes
/
dockerbasics
File metadata and controls
33 lines (23 loc) · 877 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
32
33
docker search nginx
docker pull nginx:stable-alpine3.20-perl
docker images
docker run --name mycontainer1 -dit nginx:stable-alpine3.20-perl sh
docker ps
docker ps -a
docker inspect <container name>
docker search --filter "is-official=true" ubuntu
docker search --format "table {{.Name}}\t{{.Description}}" --no-trunc ubuntu
# trial ssignment: Run a container name my-test using centos (dokken/centos-8) with detached mode'
Perform below steps
#list out using docker command
#using docker exec command check the ip address: 'ip addr'
#check the release version inside the container: 'cat /etc/os-release'
docker run --name mytest -d dokken/centos-8
docker exec -it mytest cat /etc/redhat-release
docker exec -it mytest ip addr show
------------
Try some more commands
docker history <image name>
docker logs <containerid>
docker restart <containerid>
docker info