average-father-89924
05/06/2024, 11:27 AMpants run my_project:bin successfully. However, when I want to deploy my project (pants package my_project) it fails with ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?
I already added git to the docker_image but that does not solve it. I feel there is must be an obvious way that I can't see yet, since I couldn't find anyone reporting a similar issue in this channel.full-author-61014
05/06/2024, 11:39 AMgit executable must be explicitly stated using a runtime dependency with a system_binary.bitter-ability-32190
05/06/2024, 11:41 AMaverage-father-89924
05/06/2024, 12:32 PMpython_sources
> system_binary(
> name="git",
> binary_name="git",
> )
I also changed binary_name="/usr/bin/git" . But I still get the same error that git is not installed or not in my path.bitter-ability-32190
05/06/2024, 1:23 PMbitter-ability-32190
05/06/2024, 1:24 PMaverage-father-89924
05/06/2024, 1:31 PM[pex]
executable_search_paths = ["/usr/bin/git"]BUILD:
system_binary(
name="git",
binary_name="/usr/bin/git",
)
python_sources(dependencies=[":git"])
average-father-89924
05/06/2024, 1:36 PMpants.toml is defined as
> [environments-preview.names]
> docker_linux = "//:docker_linux"
If I change it to local_linux it works:
> 153303.44 [DEBUG] Completed: package goal
(I am not sure what that means though)bitter-ability-32190
05/06/2024, 1:51 PMaverage-father-89924
05/06/2024, 2:15 PMdocker_environment(
name="docker_linux",
platform="linux_x86_64",
image=f"python:{python_version}-slim-bullseye",
python_bootstrap_search_path=["/usr/local/bin"],
)Maybe it is possible to give some instructions to the docker_environment?
bitter-ability-32190
05/06/2024, 2:18 PMimage=. 😕curved-television-6568
05/06/2024, 2:45 PMaverage-father-89924
05/07/2024, 6:58 AM