Skip to content

dockerTools.pullImage: errors from skopeo about --src-tls-verify (difficult to repro) #133515

@antifuchs

Description

@antifuchs

Describe the bug

On latest unstable, The new version of the skopeo package (1.4.0, introduced in 335f187) seems to have changed something and now complains about --src-tls-verify as used here.

Steps To Reproduce

Build this docker package definition:

{ pkgs ? import <nixpkgs> { } }:
pkgs.dockerTools.pullImage 
{
    imageName = "alpine";
    imageDigest = pkgs.lib.fakeSha256;
    sha256 = pkgs.lib.fakeSha256;
    finalImageName = "alpine";
    finalImageTag = "latest";
}

on latest nixos-unstable (and nixpkgs-unstable) with skopeo 1.4.0, and you get the following error:

asf@ferdl:~/Mess/current> nix-build hello-docker.nix
these 2 derivations will be built:
  /nix/store/lwwy307wq35dadjynyjd756cbfijrl0x-docker-image-alpine-latest.tar.drv
  /nix/store/0lvh6c9ya6v6s3hb6mc18wdj5cr234kx-docker-image-hello-docker.tar.gz.drv
building '/nix/store/lwwy307wq35dadjynyjd756cbfijrl0x-docker-image-alpine-latest.tar.drv'...
FATA[0000] unknown flag: --src-tls-verify
error: builder for '/nix/store/lwwy307wq35dadjynyjd756cbfijrl0x-docker-image-alpine-latest.tar.drv' failed with exit code 1;
       last 1 log lines:
       > FATA[0000] unknown flag: --src-tls-verify
       For full logs, run 'nix log /nix/store/lwwy307wq35dadjynyjd756cbfijrl0x-docker-image-alpine-latest.tar.drv'.
error: 1 dependencies of derivation '/nix/store/0lvh6c9ya6v6s3hb6mc18wdj5cr234kx-docker-image-hello-docker.tar.gz.drv' failed to build

Weirdly enough other definitions with actual SHA256 values (e.g. some definitions emitted from nix-prefetch-docker) do work, whereas others fail with the same message as above.

Expected behavior

Should not emit that skopeo error

Screenshots

n/a

Additional context

n/a

Notify maintainers

@edwtjo, @zowoq

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.52, NixOS, 21.11 (Porcupine)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.4pre20210707_02dd6bb`
 - nixpkgs: `/nix/store/0j4qxa4l7hf9fy831ryyd678hq6dcl6f-source`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: [skopeo]
# a list of nixos modules affected by the problem
module:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions