Certified Kubernetes Administrator
*************************************
kubernetes tutorial | Dockerfile | Create a docker image using Dockerfile | DEMO
Description:
*************
In this video, you are going to learn the basics of Dockerfile & how to Create a container Image using Dockerfile.
1. How to create our own Images ?
2. What is Dockerfile ?
3. Approach to create an image using Dockerfile
4. Images Layers
5. Docker File Instructions
6. DEMO: Create a docker Image using Dockerfile
For suggestions/feedback/doubts contact
email: kvk@vsparkz.com
Happy Learning !!!
===========================================================================================
USEFUL LINKS:
###########
Docker Documentation:
***********************
https://docs.docker.com/
Dockerfile Reference:
***********************
https://docs.docker.com/engine/refere...
Dockerfile best practices:
***************************
https://docs.docker.com/develop/devel...
==========================================================================================
#cka #kubernetes #k8s #containers #docker
DEMO Steps:
**************
Step 1: Connect to Docker Host & Check docker is started
---------------------------------------------------------------------------------------------
$ service docker status
Step 2: Create & Review the Dockerfile
-------------------------------------------------------------
$ vi Dockerfile
Dockerfile to build the VSPARKZ webserver
FROM ubuntu:latest
RUN apt-get update -y
RUN DEBIAN_FRONTEND=noninteractive apt-get install apache2 -y
COPY index.html /var/www/html/index.html
EXPOSE 80
ENTRYPOINT ["apachectl", "-D", "FOREGROUND"]
Step 3: Build the image using Dockerfile
----------------------------------------------------------------
$ docker build -t vsparkz/webserver:latest .
Step 4: Push the new image to docker hub
----------------------------------------------------------------------
$ docker login
$ docker push vsparkz/webserver:latest
Step 5: Clean the local registry & the other traces
-------------------------------------------------------------------------------
$ docker rmi ubuntu:latest
$ docker rmi vsparkz/webserver:latest
Step 6: Test the New Image
----------------------------------------------
$ docker run -d -p 8080:80 --name happy vsparkz/webserver:latest
On this page of the site you can watch the video online kubernetes tutorial | Dockerfile | Create a docker image using Dockerfile | DEMO with a duration of hours minute second in good quality, which was uploaded by the user VSPARKZ 22 July 2021, share the link with friends and acquaintances, this video has already been watched 568 times on youtube and it was liked by 9 viewers. Enjoy your viewing!