Skip to content

Fix Docker build failure and configuration issues#4

Open
ansh0014 wants to merge 1 commit intozacscoding:masterfrom
ansh0014:fix-docker-golang-version
Open

Fix Docker build failure and configuration issues#4
ansh0014 wants to merge 1 commit intozacscoding:masterfrom
ansh0014:fix-docker-golang-version

Conversation

@ansh0014
Copy link

  • Update Dockerfile from Go 1.14 to Go 1.21-alpine
  • Implement multi-stage build for smaller image size
  • Add MySQL root password in docker-compose.yaml
  • Fix article-server command path (article-server -> ./article-server)
  • Add proper volume mount for config file (local.yaml -> config.yaml)
  • Add depends_on to ensure MySQL starts before article-server
  • Include build context and dockerfile specification

These changes resolve Docker build failures and runtime configuration errors."

- Update Dockerfile from Go 1.14 to Go 1.21-alpine
- Implement multi-stage build for smaller image size
- Add MySQL root password in docker-compose.yaml
- Fix article-server command path (article-server -> ./article-server)
- Add proper volume mount for config file (local.yaml -> config.yaml)
- Add depends_on to ensure MySQL starts before article-server
- Include build context and dockerfile specification

These changes resolve Docker build failures and runtime configuration errors."
@ansh0014
Copy link
Author

ansh0014 commented Feb 10, 2026

Problem

  • Docker build failed due to outdated Go version (1.14)
  • Missing MySQL credentials in docker-compose
  • Incorrect article-server command path
  • Missing volume mounts for config and migrations

Solution

  • Updated Dockerfile to use golang:1.21-alpine
  • Added MySQL environment variables to docker-compose
  • Fixed article-server command path
  • Added volume mounts for config and migration files
  • Added depends_on to ensure correct startup order

Testing

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