linux:docker
Docker | Podman Notes
##Install Docker:
sudo dnf install docker
##Get an image, RHEL 8 in this case:
sudo docker pull registry.access.redhat.com/ubi8/ubi:latest
##Add ENV SMDEV_CONTAINER_OFF=1 to: (you have to be root)
dzdo vi /var/lib/containers/storage/overlay/ecf6a89969f55913ddb3946ec16ae6f081ea6da1bbbdd9405acc637c25409b91/diff/root/buildinfo/Dockerfile-ubi8-8.9-1136
##Show Docker images
docker images
##Start basic image up
sudo docker run -it --name test8 registry.access.redhat.com/ubi8/ubi
##Start web image forwarding 80 on the server to 8080 on the container
sudo docker run -itd --name test8-web -p 8080:80 registry.access.redhat.com/ubi8/ubi (test 1)
sudo docker run -itd --name test8-web2 -p 8081:80 registry.access.redhat.com/ubi8/ubi (test 2)
/usr/sbin/httpd
##See what is running
sudo docker ps
##Install httpd on host and container:
sudo dnf install httpd
##To get to the terminal
docker exec -it test8-web1 bash
##Remove container
sudo docker rm test8
sudo docker rm --force test8-web
####REF: https://yashlahoti.medium.com/steps-to-install-docker-in-rhel8-red-hat-enterprise-linux-51c982621118
linux/docker.txt · Last modified: 2024/10/01 13:58 by 127.0.0.1