Replies: 2 comments
-
Not sure I understand the difference between setting More examples here: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/docker/examples.nix |
Beta Was this translation helpful? Give feedback.
0 replies
-
I love it. I have this on my list too. We've had issues in the past with the base image suddenly missing dependencies from time to time, and I really want to move the build to Nix. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@JakobLichterfeld
Was curious how this would look. Not saying we should or shouldn't do this, just want to document what I did.
Used the treefmt pull request as a base.
Obviously this is rough. I haven't looked at the entryPoint, the labels, or the grafana image. Maybe grafana should stay as is in fact, not sure.
Build with:
$ nix build '.#docker'
This gives a tar.gz file:
According to https://hub.docker.com/r/teslamate/teslamate/tags, the latest published image was 69.02MB + 55.25 MB + 66.79 MB. Or 191.24MB, the as expected the nix version is slightly smaller.
This image needs to be imported into docker. Use "docker load". See https://nix.dev/tutorials/nixos/building-and-running-docker-images.html for instructions. I haven't done that yet. Wonder if it actually is going to work.
Beta Was this translation helpful? Give feedback.
All reactions