Featured Post

Efficient Duplicate Image Removal: Using ImageDeDup Python

Efficient Duplicate Image Removal: A Python Guide In this blog post, we will walk you through the process of identifying and removing duplicate images from your directories using Python. We will leverage perceptual hashing to find similar images and delete duplicates while keeping the largest file in the group. This solution is perfect for users who want to save disk space and keep their image collections organized. Why You Should Use This Code Over time, especially when dealing with large collections of images, duplicate files can accumulate. These duplicates take up unnecessary space on your system. Manually sifting through these images can be tedious, but with the help of Python, perceptual hashing, and concurrent processing, this task becomes much easier. Benefits: Efficient Duplicate Detection : By using perceptual hashing (PHash), the code compares images based on their v...

Working with docker

Docker Image : 

Building a Docker Image  by docker file – includes the build and all the dependencies, 

Container : Running the created docker image as a container on the Docker by using run command. 

Docker Daemon – The background application which manages building, running and distributing docker containers.

Docker Client – The command line tool that helps to interact with docker daemon.

Docker Hub : It is a registry(repository) of Docker Images similar to github repositories of branches and projectes. Hence, once a image is build, it can be pushed to the docker hub and can be pulled and run as a container.

Docker Icon

docker build -t rishoo2019/cheers2019 .

docker run -it --rm rishoo2019/cheers2019

docker pull 

docker images – Displays all the container images present on the docker

docker ps  =  Displays all the containers currently running

docker ps -a  =  Displays all the containers that we ran, also there remanents


docker run -it busybox sh      
Running the run command with the 
-it flags attaches us to an interactivity in the container. 
Now we can run as many commands in the container as we want.


docker rm  = To clean up the remnant containers once done with them and save disk space

$ docker rm $(docker ps -a -q -f status=exited)  Or we can use --- docker container prune

Command for deleting all containers from which we have exited

the -q flag, only returns the numeric IDs and -f filters output based on conditions provided. 
One last thing that'll be useful is the --rm flag that can be passed to docker run 
which automatically deletes the container once it's exited from. 
For one off docker runs, --rm flag is very useful.

 

$ docker run -d -P --name static-site prakhar1989/static-site

$ docker port static-site

In the above command, -d will detach our terminal, 
-P will publish all exposed ports to random ports and 
finally --name corresponds to a name we want to give. 
Now we can see the ports by running the docker port [CONTAINER] command

You can open http://localhost:32769 in your browser.

 

$ docker run -p 8888:80 prakhar1989/static-site

You can also specify a custom port to which 
the client will forward connections to the container.

 

$ docker stop static-site

To stop a detached container

Comments

Related Posts

Scrum Roles (Scrum Master, Product owner, Development Team) and collaboration between each other

Efficient Duplicate Image Removal: Using ImageDeDup Python

MySpace Tries to Recapture the social-networking magic...

Microsoft Promisses to launch its Microsoft Tablet this christmas...

First GNOME Census Results