Skip to content

Add Dockerfile for Go web app#28

Open
Rupali-1003 wants to merge 1 commit intoiam-veeramalla:mainfrom
Rupali-1003:add-dockerfile
Open

Add Dockerfile for Go web app#28
Rupali-1003 wants to merge 1 commit intoiam-veeramalla:mainfrom
Rupali-1003:add-dockerfile

Conversation

@Rupali-1003
Copy link

This PR adds a Dockerfile to the Go web app to enable easy containerization and deployment.

Changes included:

  • Added Dockerfile for multi-stage build:
    • Builds Go binary inside golang:1.22.5 image
    • Copies static folder for serving HTML pages
    • Exposes port 8080
  • Go app binds to 0.0.0.0:8080 to allow access from host/EC2
  • Ready to run with:
    docker build -t go-web-app .
    docker run -p 8080:8080 go-web-app

Testing:

  • Tested locally and on AWS EC2
  • All routes (/home, /courses, /about, /contact) are serving the correct static HTML pages

This Dockerfile helps new contributors or deployers quickly run the app in a container without manual setup.

@Rupali-1003
Copy link
Author

Hi! Added a Dockerfile to containerize the Go web app and serve static pages properly. Tested locally and on AWS EC2. Please review.

@Rupali-1003 Rupali-1003 reopened this Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant