2

My project consists out of two components.

┌────────────────┐
│ Docker compose │http  ┌─────────┐
│ (http server,  ├─────►│         │
│  sql server    │      │ Go app  │
│  etc.)         │      │         │
└────────────────┘      └─────────┘
     ▲
     │ incoming http
  1. A docker compose file containing multiple services (http-server, sql, auth server, etc.). Secondly
  2. A Go app with my custom app logic that the http-server directs certain queries too.

In VScode I usually start up the Docker compose in a Terminal to run all services, and then run the Go app in debug as it contains app logic and receives the http requests that the http-server forwards.

Both components can be build and deployed as a whole via ./Dockerfile.

I now want to run all of this into GitHub Codespaces but I am not sure how to organize my Docker files. Since Go isn't installed on the Github Codespaces machines, do I need a second Dockerfile in which my Codespace environment runs in like Dockerfile.codespace? Or do I need a Docker compose file instead that collects all components/services including Go?

Daniel Stephens
  • 2,371
  • 8
  • 34
  • 86

0 Answers0