This project is to run the Coinflip application as a Docker Container and access it from the host machine web browser.
Docker should be installed on the host machine(s). Please refer Install docker for installation instructions.
- Switch to repo directory.
- Run the below command to build the Docker image.
docker build -t coinflip .
- Run the below command to run the container. By default container runs as root user. To run it as non-root user (more secure), add --u#### parameter and set #### to user id.
docker run -d -p 7777:7777 coinflip
4.a To access the service from the host machine, open the below URL on a web browser on the host machine.
http://localhost:7777/
4.b To access the service from any other machine on the network, open the below URL. Please update x.x.x.x to the IP address of the host machine.
http://x.x.x.x:7777/
- Refresh the web page to flip the coin.