Debugging a Go application inside a Docker container
Updated and validated on January 17, 2022. You can find more tutorials on how to use containers here. You may also refer to the Docker and Kubernetes sections of our Help documentation.
- Go development with Docker Containers
- Debugging a Go application inside a Docker container (this post)
- Running Go applications using Docker Compose in GoLand
- Using Kubernetes from GoLand
In the previous article of this series, we discussed how to get started using Docker to run our Go applications.
Today, we’ll take a look at how to debug a Go application that runs inside a container.
Creating the Dockerfile for debugging
Using the same repository that we used in the last article, we can switch our branch to the debug branch.