Creating a Docker Container
Since Devin has access to a Terminal and can configure and run software on its own server, setting up a Docker container is well within its capabilities. Our sample application is a Go project with MongoDB as the data store. This session is Devin’s version of a Pull Request that a real developer made to an open source project. Follow along with the live run here.Start With a GitHub Issue
We start with the original GitHub issue:

Investigating the Codebase
Devin starts off with an investigation step where it reads our linked GitHub issue and scans the actual code and configuration files of the project for required dependencies.

Testing the Container
Devin then moves on to test each container, starting with our MongoDB server and then moving on to our Go environment. Once the containers are up and running, Devin moves on to testing the application itself. From reading through Devin’s Command History I can see that it found our Swagger API definition and loaded it into the built-in Browser to see how the backend API works.

Debugging
Since we get a Connection refused error, Devin immediately moves on to debugging and correcting the Docker configuration. This is a common pattern where Devin can self-correct errors as it goes through a session. Devin quickly corrects the configuration issue, restarts the Docker container, and summarizes its completed work for us.
- Devin sets up a docker-compose.yml file in addition to our Dockerfile. This gives us some more specific orchestration settings like defining how our network works, how our volumes are configured, and which services depend on one another.
- Devin changes the build process from
go mod tidy
to a method that allows us to cache some of the dependencies in our Docker build. - Devin builds a statically linked Go binary rather than a dynamically linked one, which should be lighter weight for our docker build.
- Devin configures our CA certificates for HTTPS, and lets us use a .env file for configuration rather than passing in environment variables directly.
- And most notably, Devin adds a MongoDB service in our Docker config which the PR on the project does not. It assumes the developer has a separate MongoDB instance running already.
