-
Notifications
You must be signed in to change notification settings - Fork 86
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
Build docker images using nix #654
Conversation
2ced0f5
to
5b6b3ea
Compare
Transactions CostsSizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using
Cost of Init Transaction
Cost of Commit TransactionCurrently only one UTxO per commit allowed (this is about to change soon)
Cost of CollectCom Transaction
Cost of Close Transaction
Cost of Contest Transaction
Cost of Abort TransactionSome variation because of random mixture of still initial and already committed outputs.
Cost of FanOut TransactionInvolves spending head output and burning head tokens. Uses ada-only UTxO for better comparability.
|
67b0e2f
to
9f12208
Compare
This yields smaller closures and hence smaller docker images
This seems to still work as the nix closure for hydra-tui was correctly including the terminfo files etc.
The workflow will use a dummy Dockerfile to leverage the tagging / labelling without actually rebuilding the image.
17a6c50
to
f42ff75
Compare
As we are not using Dockerfiles, this seems to be the only way how to tag/label images when using nix to build.
f42ff75
to
c129677
Compare
Co-authored-by: Franco Testagrossa <[email protected]>
.github/workflows/docker.yaml
Outdated
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
docker push ghcr.io/input-output-hk/${{matrix.target}} |
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.
before we were using ${{ github.repository_owner }}
instead of input-output-hk
}; | ||
in | ||
rec { | ||
packages = hydraPackages // { |
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.
what does //
means?
is it like the set difference operation?
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.
It's the opposite, it's a union and thus merges the argument set on the right hand side to the one on the left hand side.
docker inspect ghcr.io/input-output-hk/${{matrix.target}}:unstable | ||
|
||
- name: 📤 Maybe push | ||
if: ${{ github.ref == 'refs/heads/master' || (github.ref_type == 'tag' && matrix.target != 'hydraw') }} |
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.
maybe 'hydraw' can defined inside an exclusion list?
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.
It's the single exclusion in our repo. The target list is (and always will be) very specific to the project. I don't like to over generalize the job (it becomes harder to read & maintain IMO).
This is a follow-up of #646 (which is a follow-up of #625)
☃️ Build our docker images directly using nix instead of "nix inside docker". This will allow us to re-use the nix store better after a build / between builds.
☃️ Keep the docker workflow as is (for now) to do the tagging / labelling as before (with a small workaround).
☃️ The images now only include what is needed and don't have a base (before it was
alpine
) anymore. Image sizes went down between 20-50%:☃️ NOTE: Building & pushing images from tags is untested and we'll need to see if it works on our next release.
To check before merging: