-
Notifications
You must be signed in to change notification settings - Fork 7
Useful commands
Sushant Rathi edited this page May 25, 2019
·
1 revision
Important commands:-
- To start registry-
docker run -d \
--restart=always \
--name registry \
-v `pwd`/certs:/certs \
-v /media/disk/registry:/var/lib/registry \
-e REGISTRY_HTTP_ADDR=0.0.0.0:443 \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \
-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \
-p 5000:443 \
registry:2
- To setup deployment server (to be run from inside deploybot container)-
docker-machine -D create -d generic --generic-ip-address vm1-internal.devclub.in --generic-ssh-key /keys/ssh_key --generic-ssh-user devclub --generic-ssh-port 22 --generic-engine-port 2375 vm1-internal
- For testing:
deploy.sh -n -u https://github.com/devclub-iitd/deploybot_testing -b master -m vm1-internal -a internal -s test
- Mount /var/vdb (200GB volume) on /media/disk (wil have to make a file system first)
- Install docker-ce
- Install docker-machine
- Add public key of mainvm into ~/.ssh/authorized_keys
- Add private registry certificate in /etc/docker/certs.d/registry.mainvm:5000
- Change docker data root to /media/disk/docker
- Enable devclub user to run commands without sudo (“sudo visudo -f /etc/sudoers”)
- Run nginx-proxy container on the VM