Loading Blog Search...

Wednesday, January 13, 2021

docker compose to remote host

# setup
ssh -nNT -L /tmp/socket.remote:/var/run/docker.sock user@remote.example.com &
export TUNNEL_PID=$!
export DOCKER_HOST=unix:///tmp/socket.remote

# use docker, docker-compose here

# shutdown and cleanup of the socket
rm -f /tmp/socket.remote

CLI tool to manage Ubuntu network

Seems Ubuntu@WSL2 has problem on DNS. I need to use nmtui to manual configure DNS server time to time.