How to set up a Docker Host

brew install docker
sudo su -
pacman -Syu
pacman -S docker, openssh
# to start services automatically:
systemctl enable sshd
systemctl enable docker
# start sshd
systemctl start sshd
exit
vim /lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd -H tcp://192.168.1.10 -H fd://
sudo su -
# reload docker configuration
systemctl daemon-reload
# start docker
systemctl start docker.service
exit
ssh-keygen
ssh-copy-id <user>@192.168.1.10
export DOCKER_HOST=ssh://192.168.1.10
echo 'export DOCKER_HOST=ssh://192.168.1.10' >> ~/.zshrc 
## or, case you use bash
echo 'export DOCKER_HOST=ssh://192.168.1.10' >> ~/.bashrc
docker ps
docker run -it -p 8080:8080 app app

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store