Test drive your remote machine
Test drive your remote machine
Let's do a small exercise to show off the power of this setup.
Clone a sample github project and launch it:
mkdir -p ~/dev && cd ~/dev && \ git clone https://github.com/ShoppinPal/loopback-mongo-sandbox.git && \ cd ~/dev/loopback-mongo-sandbox && \ docker-compose run builder npm install && \ docker-compose up
What did we just do?
Cloned a project.
Installed dependencies.
Finally the
docker-compose up
command:launched the app by mounting the local source code and dependencies into a docker container,
and launched MongoDB as its database.
Troubleshooting
If you run into this problem:
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
try adding your user to the
docker
group, reference:sudo usermod -aG docker <username>
if that doesn't do it, then login/logout of the ssh session
ultimately restart your machine and that should definitely do it.
Let's browse to
http://<machine-ip>:3000/explorer
to see a fully working REST~ful API!If you had setup a DNS record previously then you can also try:
http://<myName-cloud-box-1.domain.com>:3000/explorer
to see a fully working REST~ful API!If all the containers are up and you are still not able to access the application from browser, then make sure you have enabled inbound/outbound security rules on your remote host.
Last updated