Guix, docker and Skopeo

by Jelle Licht — Sat 10 July 2021

Docker is ubiquitous; regardless of its merits. Since my commit to containers/image got upstreamed, you can use Guix in combination with Skopeo to create and share Docker images.

guix install skopeo
skopeo copy --insecure-policy \
       docker-archive:/$(guix pack -f docker hello --entry-point=bin/hello) \
       <some-docker-url-to-push-to>

That --insecure-policy flag might seem worrying, but can be left out by providing your own policy file via the --policy argument. On distributions that are not Guix System, it can probably be left out entirely, as Skopeo comes with a policy installed to /etc/containers/policy.json.

If the previous command complains abouts not being authorized to push to your particular Docker URL, you might still need to set up your Docker registry credentials. Have a look at the skopeo-login command:

skopeo login <some-docker-registry-url>