TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Using Nix with Dockerfiles

31 pointsby rrampageabout 2 years ago

4 comments

3836293648about 2 years ago
&gt; I&#x27;m serious, I haven&#x27;t had a &quot;works on my machine [but not on others]&quot; issue in years. Not a single one.<p>Clearly you haven&#x27;t touched OpenGL. Nix apps on non-nixos need a wrapper to use OpenGL and what&#x27;s worse is that you need a different wrapper for each GPU vendor
bfrogabout 2 years ago
I actually used nix in place of dockerfiles to build docker images, as it helped produce a perfectly minimal image for N architectures without much effort.
评论 #35696345 未加载
rgoulterabout 2 years ago
&gt; Use a Dockerfile and the official Nix image to build your application using Nix using roughly one shell command.<p>I&#x27;d misread the title, &amp; thought this would be about using nixpkgs&#x27; dockerTools.<p><a href="https:&#x2F;&#x2F;nix.dev&#x2F;tutorials&#x2F;building-and-running-docker-images" rel="nofollow">https:&#x2F;&#x2F;nix.dev&#x2F;tutorials&#x2F;building-and-running-docker-images</a><p>I would assume that the resulting image is about the same, but you wouldn&#x27;t need a bespoke Dockerfile. The downsides being that you&#x27;d need to know nix to maintain it (which you would anyway with this approach), and you&#x27;d need `nix` rather than `docker` to build the image.
dan0000about 2 years ago
I think this is something the writer of the article would be delighted to find: <a href="https:&#x2F;&#x2F;github.com&#x2F;railwayapp&#x2F;nixpacks">https:&#x2F;&#x2F;github.com&#x2F;railwayapp&#x2F;nixpacks</a>