-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COSI-34: Remote debugging golang on Kubernetes #19
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
@@ Coverage Diff @@
## main #19 +/- ##
=======================================
Coverage 75.52% 75.52%
=======================================
Files 4 4
Lines 237 237
=======================================
Hits 179 179
Misses 51 51
Partials 7 7
|
2f1f17f
to
b6065ea
Compare
RUN go mod download | ||
|
||
# Copy the source code | ||
COPY . . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you have no .dockerignore
to copy only what you need. Maybe it's not much a problem for intermediate stage, but copying all stuff like .git
... takes more time and make bigger layer in cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, it might be worth adding a .dockerignore now.
We didn't need it initially as we are using distroless for production.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the file; thanks for the in-person discussion yesterday.
Build the Docker image with Delve by running: | ||
|
||
```bash | ||
make container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, just make a delve-container
make command? Since there are two Dockerfiles, I think it makes sense to have two build options. Your call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took your idea, thanks
Keeps debug and prod env seperate
4978ea0
to
c055965
Compare
Add docs and configurations around remote debugging