Member-only story
Exposing Docker Daemon over TLS, while supporting socket
4 min readFeb 16, 2025
This post covers the details on how to expose docker daemon securely.
Installing the docker on the local machine or VM is quite easy and straight forward, but that comes with a cost, which is local resources like RAM, CPU & these both impacts the battery 🪫.
What if for zero or almost no price, you get a VM on cloud providers like AWS(free tier), Azure(with free credits/tier), GCP(with free credits) or may be Oracle Cloud or for that matter any other cheaper alternatives!
Installing the Docker as usual.
Setup commands for Ubuntu:-
# uninstall conflicting packages
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee…