Openshift Training Command
Openshift Training Command
Openshift Training Command
------------------
DO180 part of containers + openshift
>Yes
>who am i
docker/podman
vmwere
kernel
bash
podman images
27-04-2021
-------------------
Interactive terminal: podman run -i -t centos
ls -l
exit
Enter into container: docker/podman attach <container name>
28-04-2021
-----------------------------------------------------
Q1)
podman run -it --name webserver11 -p 3354:80 centos
yum install httpd -y
cd /var/www/html/
echo Hello World > index.html
httpd: -DBACKGROUND
create Tar file: podman export webserver2 -o test1.tar (if it will not work delete
a file)
Import: podman import test1.tar test:v1
Q2
Dockerfile:
mkdir docker
ls
vim Dockerfile
FROM centos (image)
MAINTAINER [email protected] (name or email)
RUN - run commands inside image/container yum install httpd -y
COPY dev.html /var/www/html/ echo Hello World >
/var/www/html/index.html
CMD - run the commands ur going to run starting time httpd -DFOREGROUND
ENTRYPOINT - Each and every time if u want to run
EXPOSE - port expose 80
ADD cool.
WORKDIR - which dir u wants to work as /usr/share/nginx/html
Docker swarm
---------------
how to create cluster of docker swarm : docker swarm init --advertise-addr
3.14.149.168