Hi all. I'm trying to build a Docker container whe...
# general
b
Hi all. I'm trying to build a Docker container where I am installing tools that I need and modifying the
PATH
in the
Dockerfile
. Looks something like this:
Copy code
# Dockerfile

...
RUN git clone <https://github.com/asdf-vm/asdf.git> /root/.asdf --branch v0.10.0
ENV PATH=/root/.asdf/shims:/root/.asdf/bin:$PATH

COPY .tool-versions ./.tool-versions
RUN asdf plugin-add python && \
	asdf plugin-add nodejs && \
	asdf plugin-add yarn && \
	asdf install python && \
	asdf install nodejs && \
	asdf install yarn
...
RUN yarn run gulp compile
...
So I'm setting the
/root/.asdf/bin
path to be part of the
PATH
for the Dockerfile, but when the line
RUN yarn run gulp compile
executes in the
docker_image
target, I get the following error:
Copy code
Traceback (most recent call last):
  File "/pants/setup/bootstrap-Linux-x86_64/2.13.0rc0+git30af7f9c_py38/lib/python3.8/site-packages/pants/engine/process.py", line 272, in fallible_to_exec_result_or_raise
    raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Searching for `python3` on PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin' failed with exit code 127.
python3
can't be found and
PATH
is missing
/root/.asdf/bin
. I can't tell if that's the
PATH
from my local host or if that's inside the container but I know that on my local I have:
Copy code
[python-bootstrap]
# All pants users should configure asdf for 3.8.
search_path = [
    "<ASDF_LOCAL>",
]
in my
pants.toml
, so pants should know to check for asdf locally, and I've set the
PATH
in the context of the container build. I'm not sure what my next steps are and I'd appreciate any help!
s
Copy code
pants.engine.process.ProcessExecutionFailure: Process 'Searching for `python3` on PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin' failed with exit code 127.
is an error from pants, not docker