Erwin Bierens

Knowledge is Power

🐳 Docker Cheatsheet for Daily Management

2025-05-19 2 min read Docker Linux     "Erwin Bierens"

This cheatsheet contains the most common Docker commands for daily use, focused on managing containers, images, volumes, and Docker Compose. Perfect for developers, sysadmins, and DevOps engineers.

For full documentation, visit: https://docs.docker.com


📦 Container Management

Action Command
Start a container docker start <container>
Stop a container docker stop <container>
Restart a container docker restart <container>
Remove a container docker rm <container>
Force remove docker rm -f <container>
List running containers docker ps
List all containers (including stopped) docker ps -a
View container logs docker logs <container>
Follow container logs docker logs -f <container>
Execute shell inside container docker exec -it <container> bash
Rename a container docker rename <old> <new>

🧱 Image Management

Action Command
List images docker images
Remove an image docker rmi <image>
Build image from Dockerfile docker build -t <tag> .
Pull image from Docker Hub docker pull <image>
Push image to registry docker push <image>
Tag an image docker tag <image> <new-tag>

📂 Volumes & Networks

Action Command
List volumes docker volume ls
Remove a volume docker volume rm <volume>
List networks docker network ls
Connect container to a network docker network connect <network> <container>
Disconnect container from a network docker network disconnect <network> <container>

🛠️ Docker Compose (v2 syntax)

Action Command
Start services docker compose up -d
Stop services docker compose down
Restart services docker compose restart
View logs docker compose logs -f
Restart a specific service docker compose restart <service>
Rebuild containers docker compose up --build
Stop and remove containers, networks, and volumes docker compose down -v

🧼 Clean-up & Maintenance

Action Command
Remove stopped containers docker container prune
Remove unused volumes docker volume prune
Remove dangling images docker image prune
Clean all unused data (containers, images, networks, volumes) docker system prune -a

🧠 Miscellaneous

Action Command
Show Docker version docker version
Inspect container details docker inspect <container>
Show real-time container stats docker stats
Show disk usage docker system df

Disable Automatic Startup Microsoft Teams for Linux (Ubuntu)

This how to is written for debian distro based operating systems. During this test i’m using Ubuntu Desktop 18.04.3 LTS.

Disable automatic startup

In case you don’t want to automatically startup Micrsoft Teams you can use the following setting to change this behavior. Go to Menu > Search > Startup Applications preferences.

Here you can disable or remove Teams startup.

Teams disable startup

/

Microsoft Teams for Linux

This how to is written for debian distro based operating systems. During this test i’m using Ubuntu Desktop 18.04.3 LTS.

Installing Microsoft Teams

First of all download the right client package for Microsoft Teams.

For my Ubuntu desktop i’m using the DEB 64-bit installer. You can also download the package using wget.

Teams Installer Download

Download the package from the Teams website. You can find the latest version right here (Right click the version and copy the link)

Continue reading

Route all traffic by OpenVPN

2018-12-11 1 min read Linux Security Erwin Bierens

In October i posted a blog about setting up your OpenVPN server in 2 minutes.

This blog is a addon to your existing configuration to route all traffic over the VPN. 

/

Change server configuration

go to the config file (/etc/openvpn/server.conf) and add the following lines:

    push "redirect-gateway def1"
    push "dhcp-option DNS "
    push "dhcp-option DNS 1.1.1.1"

Restart your OpenVPN daemon

    sudo /etc/init.d/openvpn restart

Change client configuration

Change your client config, and add the following line

Continue reading

Running PowerShell on your RaspberryPi

2018-12-06 1 min read Linux Powershell Erwin Bierens

For many years PowerShell was a Windows-only thing that was part of the closed Windows ecosystem. Now a days PowerShell is open source up at https://github.com/PowerShell with lots of docs and scripts, also open source.

PowerShell is supported on Windows, Mac, and a half-dozen Linux distros.

While running PowerShell on your RaspberryPi is still experimental and only supported for Raspbian Stretch it’s running pretty smoothly.

/

Installing

Install the prerequisites

	sudo apt-get install libunwind8

Grabbing the latest tar.gz

Continue reading

Move VMs between ESXi Hosts with SSH

2018-10-31 1 min read Linux VMWare Erwin Bierens

Recently is had some issues with capacity and old server hardware. I created some new ESXi hosts and wanted to move the VMs to the new hosts. Below i will describe how i obtained this:

/

Setup Access

Start SSH and ESXi Shell on both servers, you can do this from the Web UI, Hosts > Actions > Services

Now create the destination folder (mostly VM name) on the new ESXi host.

Continue reading
Older posts