4 Docker Tips That You Should Know

post-title
Docker has some great containers and daily use stuff which can reduce your workload and even protect your privacy.

1. Get Shell Access To Docker Container

While one of your docker contaier is running you might need to get shell access in order to make some chagnes like resetting password or changing file content.

Step 1

Open terminal and get list of your running docker containers

docker ps

Container ID is in this format bbe4a33f4f63

Step 2

Access the shell mode

docker exec -ti bbe4a33f4f63 sh

After you run this command you will be able to get root shell access to your container.

2. Run Docker As Non-Root User

When docker is installed it creates a user group as docker but you might have

Create a user group

sudo groupadd docker

If it exists it will give you an output groupadd: group 'docker' already exists

Then add current user to docker group

sudo gpasswd -a $USER docker

Then logout and login to see the effect.

Run command

docker ps

Now you will be able to use docker as non-root user

3. User DockStation To Manage Your Docker Containers

DockStation has been around for a while and is very useful when to comes to manageing a project or bunch of containers. It’s is all you need to manage your workstation.

Download dockstation

4. Install Pi-Hole for DNS level ad-blocking

You might be using browser addons to block useless ads and for privacy concern. But they increase the amount of RAM used by your browser. With Pi-Hole you can block any website or take a list of hosts and them to pi-hole then all of them will be blocked at once. You can get list of website which are mostly malware/popups/porn/phishing and bad advertising companies.

Get host from here: https://github.com/StevenBlack/hosts

Just create a container and run change your DNS, then all the ads will be blocked and if there’s a custom website you want to block, just add it to pi-hole via it dashboard

Download Pi-Hole