DOCKER HUB

One of Docker function is communication with registry that related with cloud computing. Docker has its own service called Docker Hub that is for finding and sharing container images. It is the world’s largest repository of container images and also it open source projects building and distributing the code in the containers.

So, before we learn docker pull and docker push and also another basic command, you have to register and make sure you can access your docker hub account.

DOCKER ADGUARD

After you sign up to Docker Hub, now, we can pull the docker image from registry, we can pull docker image from another docker hub account, now i will give the example for docker pull which is adguard image, you can see on dockerhub downloads the official adguard image, here.

Now follow the command:

  • docker pull adguard/adguardhome

  • If docker pull is unsuccessful, the reason is that you need to log in to dockerhub before downloading, so you can use it first:

  • docker login

  • Fill the username and password according to what you have made. After you pull docker image you can check whether it is on your list image or no, run this command

  • docker images

    docker images -a

    docker rmi image id

    docker ps

    docker ps -a

    docker rm port number

    docker rm `docker ps -qa'

    docker rm -f `docker ps -qa'

  • There are several command basic for running docker that will we used on next docker tutorial, -a means all, so if command docker images -a means show all the docker images list, rmi means remove image , ps means the container that you run, rm means remove container, `docker ps -qa' means all container, -f means force.

    Now, to start adguard and make it into the list on docker container, run this command,

  • docker run --name adguardhome -v /my/own/workdir:/opt/adguardhome/work -v /my/own/confdir:/opt/adguardhome/conf -p 53:53/tcp -p 53:53/udp -p 67:67/udp -p 68:68/tcp -p 68:68/udp -p 80:80/tcp -p 443:443/tcp -p 853:853/tcp -p 3000:3000/tcp -d adguard/adguardhome

  • # run means you make a container

    You can check docker container first, use docker ps to see that is adguard has on the container list or no, If there is an error that the port number is occupied, such as: port 68, port 67, port 53. You can cut off the activated adguard port. But before that you can see the port information first.

  • netstat -tunlp | grep 68

    netstat -tunlp | grep 67

    netstat -tunlp | grep 53

  • Delete the port number

  • kill -9 68 port ID

    kill -9 67 port ID

    kill -9 53 port ID


  • DOCKER ADGUARD TEST

    After you finish the command, open the firefox browser on your Virtual Machine and after that open your youtube and it will have some advertisement. See the picture below,


    DOCKER ADGUARD PROCESS

    Now, please check your local port first, using ifconfig command, mine is : http://172.16.98.154:3000/ , and it will show like the picture below,


    DOCKER ADGUARD RESULT

    To make sure that your adguard is worked or no please rechecked your youtube and see whether is it work or no, and when it is working, there will have no advertisement . See the result below,