Docker is an open platform for distributed applications for developers and sysadmins. It can be used to quickly develop and deploy web applications.
You will need to first install Docker. Instructions can be found here:
Build and Run a Container
To build and run a container:
docker build -t lab-interactives-site .
docker run --name interactives -p 9292:9292 -p 35729:35729 lab-interactives-site
If you have
docker-compose installed, this process is even easier:
Once the container is running you will find it at: http://labinteractives.docker
You can open a second terminal and run:
docker exec -ti <container_name> /bin/bash
This will allow you to run other commands like
Extra Notes For
To connect to the LiveReload server, you’ll have to create an SSH tunnel after the container has started.
docker-machine env defaultto get the machine’s IP address
ssh -N -L 35729:localhost:35729 docker@<ip_addr_for_docker_machine>to start the ssh tunnel
If you don’t want to bother with SSH tunnels, you can use RemoteLiveReload instead. However, you’ll have to run the following command before building and starting the container.
sed -i "s/guard 'livereload'/guard 'livereload', host: '0.0.0.0', port: '35729'/" Guardfile