Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 487 Bytes

docker-machine.md

File metadata and controls

20 lines (17 loc) · 487 Bytes

Get a linux server IP address and ensure it has docker installed with TCP port 2376 open

docker --version
firewall-cmd --add-port=2376/tcp --zone=public

Enable password-less ssh login

ssh-copy-id root@ip

Create docker machine

docker-machine create --driver generic --generic-ip-address=${SERVER_IP} --generic-ssh-key ~/.ssh/id_rsa --generic-ssh-user ${SERVER_USER} ${NICKNAME}

Set environment

eval $(docker-machine env ${NICKNAME})