Dockerfile | Build, Tag, Push | Build Own Image And Push To Docker Hub

preview_player
Показать описание
#Docker, #Containers, #Dockerfile Hello Friends, This video will give you the complete details on how to create a docker image from docker file, build the image using tag and push the image to docker hub repository.

we are going to use python base image and build a customized image which will run a python script when the container is running.

Dockerfile and Push docker image to Dockerhub

FROM python:latest

docker image build -t pythonsquare:0.0.1 /root/docker

# Python 3 code for hollow rectangle

# Function to print hollow rectangle
def print_rectangle(n, m) :

for i in range(1, n+1) :
for j in range(1, m+1) :
if (i == 1 or i == n or
j == 1 or j == m) :
print("*", end="")
else :
print(" ", end="")

print()


# Driver program for above function
rows = 6
columns = 20
print_rectangle(rows, columns)

Docker login

docker push thetips4you/pythonsquare:0.0.1

Docker logout

=================================================
Follow me @:
======================================================

Note: Each word by Word or sentences used in this video is self written and converted to Audio to give explanation on the steps in each tutorial . These are not automated or third party content or scrapped from any website.
Music credit: "Royalty Free Music from Bensound"
Рекомендации по теме
Комментарии
Автор

Can you please tell me that I have a folder and it has docker file so how to run it? That docker file was not created by me and i dont know that image name too.

shahidhussain
Автор

Nice but I REALLY hate that A.I. voice.

doointhedoo
Автор

don't you wanna learn something? just typing and playing music? 🤔

shayanzd