Skip to content

Example fails if /bin not on PATH #9

@chrisburr

Description

@chrisburr

On Arch Linux the example:

conda docker build -b frolvlad/alpine-glibc:latest -i example-image:123456 -o demo.tar numpy numba flask

fails with the error:

Executing transaction: done
Rolling back transaction: done

Exception('No compatible shell found!')
()

/.../sbin/chroot.fakechroot: line 147: 602419 Segmentation fault      (core dumped) env -u FAKECHROOT_BASE_ORIG FAKECHROOT_CMD_ORIG= LD_LIBRARY_PATH="$fakechroot_chroot_paths" FAKECHROOT_BASE="$fakechroot_chroot_base" "$fakechroot_chroot_chroot" "${@:1:$(($fakechroot_chroot_n - 1))}" "$fakechroot_chroot_final_newroot" "${@:$(($fakechroot_chroot_n + 1))}"
INFO:conda_docker.conda:building conda environment took 20.671 [s]
INFO:conda_docker.conda:adding conda environment in package layers
Traceback (most recent call last):
  File "/.../bin/conda-docker", line 11, in <module>
    load_entry_point('conda-docker', 'console_scripts', 'conda-docker')()
  File "/.../conda_docker/cli.py", line 121, in main
    cli(args)
  File "/.../conda_docker/cli.py", line 26, in cli
    args.func(args)
  File "/.../conda_docker/cli.py", line 114, in handle_conda_build
    layering_strategy=args.layering_strategy,
  File "/.../conda_docker/conda.py", line 635, in build_docker_environment
    layering_strategy=layering_strategy,
  File "/.../conda_docker/conda.py", line 582, in add_conda_layers
    image, hostpath, arcpath=arcpath, filter=filter, records=records
  File "/.../conda_docker/conda.py", line 548, in add_conda_package_layers
    with open(meta_path) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpi3vqxxt8/opt/conda/conda-meta/_libgcc_mutex-0.1-conda_forge.json'

This is because PATH is being propagated from the host and doesn't include /bin (in this alpine image the shell is /bin/bash). Appending /bin to PATH gets me slightly further (before hitting an unrelated segfault that I'm still debugging).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions