-
Notifications
You must be signed in to change notification settings - Fork 61
Conversation
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
@@ -0,0 +1,11 @@ | |||
FROM golang:1.18.5 |
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.
Is 1.18.5
the correct Golang version?
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.
This is ok. Most people are using a flavor of 1.18 anyways.
We're also investing in a monorepo, which will make this kind of standardization a lot easier.
Signed-off-by: Daniel Shuy <[email protected]>
Signed-off-by: Daniel Shuy <[email protected]>
30e1cce
to
ff7b1b6
Compare
Codecov Report
@@ Coverage Diff @@
## master #338 +/- ##
=======================================
Coverage 75.46% 75.46%
=======================================
Files 18 18
Lines 1174 1174
=======================================
Hits 886 886
Misses 237 237
Partials 51 51
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@daniel-shuy I tried to run this locally and I think there may be a bit more tweaking to do. So after starting the compose container and entering it, the call to |
@hamersaw ah, right. Maybe we should use docker:dind as the base image and install |
Going to punt on this until we get the monorepo setup and we can create a singular build setup for all Flyte components. |
TL;DR
Add Docker dev container to have consistent, reproducible dev environments
Type
Are all requirements met?
Complete description
The goal is to run
make
targets in a Docker container to have a consistent, reproducible dev environment (same version of Golang and tooling).Initially I was thinking of using the approach detailed in https://vbehar.medium.com/makefile-tip-of-the-day-run-with-or-without-docker-9c00ad84a700, e.g.
Then it can be added before any command to run it in a Docker container, or locally if
SKIP_DOCKER
is set totrue
, e.g.Unfortunately this doesn't work because
generate
depends oninstall
, which is fromboilerplate/flyte/golang_test_targets/Makefile
. To use this approach will require modifyingboilerplate/flyte/golang_test_targets/Makefile
to run in the container as well, butboilerplate/flyte/golang_test_targets/Makefile
is from another repository (https://github.com/flyteorg/boilerplate).Therefore I went with my current approach, using a Dockerfile to build a Docker image with tools and dependencies installed (using
make install
), and using a Docker Compose file to map the volume.And while I was at it, I also decided to add support for VS Code's Dev Containers (https://code.visualstudio.com/docs/devcontainers/create-dev-container#_extend-your-docker-compose-file-for-development).
Tracking Issue
fixes flyteorg/flyte#2911
Follow-up issue
NA