Skip to content

nix with docker #73

Description

@adminy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions