Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

nix with docker #73

Open
adminy opened this issue Dec 13, 2023 · 0 comments
Open

nix with docker #73

adminy opened this issue Dec 13, 2023 · 0 comments

Comments

@adminy
Copy link

adminy commented Dec 13, 2023

Given that the only way to build docker images using a nix command needs to do docker load command, why was docker not built-in to nixos/nix? Or at least some image that has nixos/docker-nix

here is my example:

image:
	docker run --privileged \
		--mount type=bind,source=${PWD}/.github/workflows,target=/etc/nixos \
		--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
		-it nixos/nix nix-shell -p docker --run \
		"docker load --input \$$(nix-build /etc/nixos/image.nix)"
	# docker push
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant