#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
ADD Square.py /
CMD [“python”, “./Square.py” ]
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=””)
# Driver program for above function
rows = 6
columns = 20
docker push thetips4you/pythonsquare:0.0.1
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”
View it at Youtube