hashicorp / hashicorp/vault-helm

Test.dockerfile throwing an error while building.

Open
#987 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Shell
Stars
1.3k
Forks
898
Avg merge
3d 1h
Merged PRs (30d)
1

Description

**Describe the bug**
I was trying to run tests locally following the instructions in the `CONTRIBUTING.md`. The first step of building the docker image fails due to PEP668, but this can be overridden.

**To Reproduce**
Steps to reproduce the behavior:
1. Clone the repo.
2. In the root of the repo, run `docker build -f ${PWD}/test/docker/Test.dockerfile ${PWD}/test/docker/ -t vault-helm-test`
3. You will see the output in the *Actual Behavior* below.

**Expected behavior**
You should see that the `[+] Building 87.2s (13/13) FINISHED` or something along those lines after step 2 of reproducing.

**Actual Behavior**
```sh
> [4/9] RUN pip install yq:
1.437 error: externally-managed-environment
1.437
1.437 × This environment is externally managed
1.437 ╰─>
1.437 The system-wide python installation should be maintained using the system
1.437 package manager (apk) only.
1.437
1.437 If the package in question is not packaged already (and hence installable via
1.437 "apk add py3-somepackage"), please consider installing it inside a virtual
1.437 environment, e.g.:
1.437
1.437 python3 -m venv /path/to/venv
1.437 . /path/to/venv/bin/activate
1.437 pip install mypackage
1.437
1.437 To exit the virtual environment, run:
1.437
1.437 deactivate
1.437
1.437 The virtual environment is not deleted, and can be re-entered by re-sourcing
1.437 the activate file.
1.437
1.437 To automatically manage virtual environments, consider using pipx (from the
1.437 pipx package).
1.437
1.437 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
1.437 hint: See PEP 668 for the detailed specification.
```

**Environment**
* Host: WSL2
* Docker: 24.0.7

Contributor guide

Open the contributing guide

Research direction

Start with CONTRIBUTING.md and test/docker/Test.dockerfile, then reproduce the failure using the reported docker build command. Inspect the yq installation step and make the test image build complete successfully under the PEP 668 environment; verify that the build reaches a finished state.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, dockerfile, python
Domain
build-system, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.