From 88a35c238cf53fc25e610dabfd54a1e5b33fdbd6 Mon Sep 17 00:00:00 2001 From: Akshat Sahu Date: Sun, 9 Nov 2025 22:12:17 +0530 Subject: [PATCH 1/3] docker setup and troubleshooting guide --- README.md | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/README.md b/README.md index 8516424ba1..13eafaa588 100644 --- a/README.md +++ b/README.md @@ -63,3 +63,96 @@ The voting application only accepts one vote per client browser. It does not reg This isn't an example of a properly architected perfectly designed distributed app... it's just a simple example of the various types of pieces and languages you might see (queues, persistent data, etc), and how to deal with them in Docker at a basic level. + +## Docker Setup & Troubleshooting Guide + +This section provides additional help for users who are new to Docker and may face issues while setting up or running the Example Voting App. + +1. docker-compose: command not found + +Cause: Docker Compose is not installed or not linked properly. +Fix (for Linux users): + +sudo apt install docker-compose + +After installation, verify using: + +docker compose version + +2. Containers fail to start or exit immediately + +Cause: A required image or service may have failed to build. +Fix: + +docker compose down +docker compose build --no-cache +docker compose up + +3. “Port already in use” error + +Cause: Another app or previous Docker container is using the same port (8080 or 8081). +Fix: + +Stop all running containers: + +docker stop $(docker ps -q) + +Or, change the ports in the docker-compose.yml file before running again. + +4. Docker daemon not running + +Cause: Docker Engine is not active. +Fix: + +On Windows/Mac, open Docker Desktop and wait until it says “Docker is running”. + +On Linux, start Docker manually: + +sudo systemctl start docker + + +Then try running: + +docker ps + + +to verify that Docker is running. + +5. Permission denied (Linux) + +Cause: Your user account doesn’t have permission to run Docker commands. +Fix: + +sudo usermod -aG docker $USER + +6. Cannot access http://localhost:8080 or http://localhost:8081 + +Cause: Containers might not be running properly. +Fix: + +Check the container status: + +docker ps + + +If they aren’t running, restart the app: + +docker compose up + +7. Reset the environment completely + +If you want to start fresh (remove all containers, images, and volumes): + +docker compose down --volumes +docker system prune -a + + +### Verify Installation + +Before running the app, make sure both Docker and Docker Compose are installed correctly. + +Check by running these commands: + +docker --version +docker compose version + From e6e82010f7824919df2756aa5f5b70c82b4550a5 Mon Sep 17 00:00:00 2001 From: Akshat Sahu Date: Tue, 11 Nov 2025 09:49:49 +0530 Subject: [PATCH 2/3] update readme.md --- README.md | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 13eafaa588..02c2da64b5 100644 --- a/README.md +++ b/README.md @@ -73,20 +73,20 @@ This section provides additional help for users who are new to Docker and may fa Cause: Docker Compose is not installed or not linked properly. Fix (for Linux users): -sudo apt install docker-compose +`sudo apt install docker-compose` After installation, verify using: -docker compose version +`docker compose version` 2. Containers fail to start or exit immediately Cause: A required image or service may have failed to build. Fix: -docker compose down -docker compose build --no-cache -docker compose up +`docker compose down` +`ocker compose build --no-cache` +`ocker compose up` 3. “Port already in use” error @@ -95,7 +95,7 @@ Fix: Stop all running containers: -docker stop $(docker ps -q) +`ocker stop $(docker ps -q)` Or, change the ports in the docker-compose.yml file before running again. @@ -108,12 +108,11 @@ On Windows/Mac, open Docker Desktop and wait until it says “Docker is running On Linux, start Docker manually: -sudo systemctl start docker +`udo systemctl start docker` Then try running: - -docker ps +`docker ps` to verify that Docker is running. @@ -123,7 +122,7 @@ to verify that Docker is running. Cause: Your user account doesn’t have permission to run Docker commands. Fix: -sudo usermod -aG docker $USER +`sudo usermod -aG docker $USER` 6. Cannot access http://localhost:8080 or http://localhost:8081 @@ -132,19 +131,19 @@ Fix: Check the container status: -docker ps +`docker ps` If they aren’t running, restart the app: -docker compose up +`docker compose up` 7. Reset the environment completely If you want to start fresh (remove all containers, images, and volumes): -docker compose down --volumes -docker system prune -a +`docker compose down --volumes` +`docker system prune -a` ### Verify Installation @@ -153,6 +152,6 @@ Before running the app, make sure both Docker and Docker Compose are installed c Check by running these commands: -docker --version -docker compose version +`docker --version` +`docker compose version` From 75b1d09adf7ce6d5e42fa752a3b974a753d51545 Mon Sep 17 00:00:00 2001 From: Akshat Sahu Date: Tue, 11 Nov 2025 09:54:40 +0530 Subject: [PATCH 3/3] fixed minor issues --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 02c2da64b5..763d5766ed 100644 --- a/README.md +++ b/README.md @@ -68,12 +68,12 @@ deal with them in Docker at a basic level. This section provides additional help for users who are new to Docker and may face issues while setting up or running the Example Voting App. -1. docker-compose: command not found +1. docker compose: command not found Cause: Docker Compose is not installed or not linked properly. Fix (for Linux users): -`sudo apt install docker-compose` +`sudo apt install docker compose` After installation, verify using: @@ -85,8 +85,8 @@ Cause: A required image or service may have failed to build. Fix: `docker compose down` -`ocker compose build --no-cache` -`ocker compose up` +`docker compose build --no-cache` +`docker compose up` 3. “Port already in use” error @@ -95,7 +95,7 @@ Fix: Stop all running containers: -`ocker stop $(docker ps -q)` +`docker stop $(docker ps -q)` Or, change the ports in the docker-compose.yml file before running again. @@ -108,7 +108,7 @@ On Windows/Mac, open Docker Desktop and wait until it says “Docker is running On Linux, start Docker manually: -`udo systemctl start docker` +`sudo systemctl start docker` Then try running: @@ -151,7 +151,6 @@ If you want to start fresh (remove all containers, images, and volumes): Before running the app, make sure both Docker and Docker Compose are installed correctly. Check by running these commands: - `docker --version` `docker compose version`