-----create redhat 8.1-------
20.212.105.21
10.3.0.5
k8s-node1
node1/K8s-node1pass
-----install docker------
https://docs.docker.com/engine/install/centos/
yum install -y yum-utils
yum-config-manager
--add-repo
https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce
systemctl start docker
docker run hello-world
------docker--------
docker images
docker ps -a
docker pull centos
[root@k8s-node1 yum.repos.d]# docker run -itd --name centos-test centos
de031810480d0747a0e9d325df6d35b43c5acedddea115d1c58d0cd9fb0b9b10
[root@k8s-node1 yum.repos.d]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
de031810480d centos "/bin/bash" 3 seconds ago Up 2 seconds centos-test
[root@k8s-node1 yum.repos.d]# docker exec -it centos-test sh
sh-4.4# exit
exit
[root@k8s-node1 yum.repos.d]# docker exec -it centos-test /bin/bash
[root@de031810480d /]#
offical image
docker image
ls
build
history
inspect
pull
push
rm
prune
tag
save
load
docker run
-i, --interactive Keep STDIN open even if not attached
-t, --tty Allocate a pseudo-TTY
-d, --detach Run container in background and print container ID
-e, --env list Set environment variables
-p, --publish list Publish a container's port(s) to the host
--name string Assign a name to the container
-h, --hostname string Container host name
--ip string IPv4 address (e.g., 172.30.100.104)
--network network Connect a container to a network
-v, --volume list Bind mount a volume
--mount mount Attach a filesystem mount to the container
--restart
docker run
-m,-memory
-memory-swap
-memory-swappiness=<0.
-oom-kill-disable
--cpus
-cpuset-cpus
-cpu-shares
docker container COMMAND
ls
inspect
exec
commit
cp
logs
port
top
stats
stop/start/restart
rm
prune
----redhat subscription----
https://developers.redhat.com/