-
Notifications
You must be signed in to change notification settings - Fork 10
Faster Docker dev environment #209
Conversation
Codecov Report
@@ Coverage Diff @@
## main #209 +/- ##
=======================================
Coverage 71.15% 71.15%
=======================================
Files 32 32
Lines 6067 6067
=======================================
Hits 4317 4317
Misses 1750 1750
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
fmorency
left a comment
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.
Looks cool! Some questions from Slack
- Any way to specify a debug build vs a release build?
- Any way to specify which features to activate?
- Any way to print the folder where the various pem, config and db files are located (full path)?
- If we modify something in the Cargo.toml file, will this be reflected when building/running the docker-nix stuff?
docker-nix/Makefile
Outdated
|
|
||
| .PHONY: stop-nodes | ||
| stop-nodes: | ||
| docker-compose -f genfiles/docker-compose.json -p e2e down |
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 will stop AND remove the nodes. I would like an option to only stop the nodes, WITHOUT removing them.
docker-nix/Makefile
Outdated
| stop-nodes: | ||
| docker-compose -f genfiles/docker-compose.json -p e2e down | ||
|
|
||
| .PHONY: start-nodes-dettached |
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.
Please add an option to start/stop/remove a SINGLE node.
| @@ -0,0 +1 @@ | |||
| genfiles | |||
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'd rather override /docker/e2e than create a new root directory. I'd also be okay with /docker/nix.
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.
Basically, either move this to /docker/nix or just change the e2e docker files to use nix.
Description
Using Nix to handle the dependencies of the project during the build. This means dependencies can be cached in a volume to generate the final image a lot quicker, by rebuilding only the dependencies (including crates) that have been changed. Potentially, we can cache these dependencies in a cache server so builds from scratch will download pre-built binaries from cachix (Nix's cache server).
The heart of the image is this block of code:
This block creates a base image with some useful packages, and for package
pkgit creates an image, based on the base image, containing the binary generated by the package.Related Issue
Fixes #206
Testing
Manually tested running
make start-nodesand other make targets.Checklist: