nutritious-hair-72580
01/12/2022, 5:34 PM./pants publish
for a docker image
17:32:51.78 [TRACE] Completed: pants.core.goals.publish.package_for_publish
log: failed to find directory: exec: "sh": executable file not found in $PATHThe push refers to repository [<http://888845.dkr.ecr.us-east-1.amazonaws.com/8/example|888845.dkr.ecr.us-east-1.amazonaws.com/8/example>]
780d01aa651c: Preparing
Any ideas? This is with 2.9.0rc6.curved-television-6568
01/12/2022, 8:19 PMCompleted: pants.core.goals.publish.package_for_publish
) and the docker push was under way (The push refers to repository [<http://888845.dkr.ecr.us-east-1.amazonaws.com/8/example|888845.dkr.ecr.us-east-1.amazonaws.com/8/example>]
) could that error be from something else?experimental_shell_command
targets, for instance?docker_image
?)nutritious-hair-72580
01/13/2022, 9:35 AMpants.toml
.
docker_image(
name="example",
repository="example/image",
registries=["<http://99999999.dkr.ecr.us-east-1.amazonaws.com|99999999.dkr.ecr.us-east-1.amazonaws.com>"],
)
It waits on log: failed to find directory: exec: "sh": executable file not found in $PATH
for about 5 seconds.
If i comment out registries, i don’t get that message and there is no delay. The publish fails later as expected due to auth with docker.io.curved-television-6568
01/13/2022, 9:40 AMnutritious-hair-72580
01/13/2022, 10:00 AMcurved-television-6568
01/13/2022, 10:34 AM11:31:37.76 [INFO] Built docker image: <http://99999999.dkr.ecr.us-east-1.amazonaws.com/example/image:latest|99999999.dkr.ecr.us-east-1.amazonaws.com/example/image:latest>
11:31:37.76 [TRACE] Completed: pants.backend.docker.goals.publish.push_docker_images
11:31:37.76 [TRACE] Completed: pants.core.goals.publish.package_for_publish
The push refers to repository [<http://99999999.dkr.ecr.us-east-1.amazonaws.com/example/image|99999999.dkr.ecr.us-east-1.amazonaws.com/example/image>]
cf8c8c8b5a23: Preparing
d09836256ed7: Preparing
984d2bf694d9: Preparing
5e2d6061e5d9: Preparing
aedcb370b058: Preparing
c3a0d593ed24: Waiting
26a504e63be4: Waiting
8bf42db0de72: Waiting
31892cc314cb: Waiting
11936051f93b: Waiting
no basic auth credentials
𐄂 <http://99999999.dkr.ecr.us-east-1.amazonaws.com/example/image:latest|99999999.dkr.ecr.us-east-1.amazonaws.com/example/image:latest> failed.
11:31:38.63 [DEBUG] Publish result data:
[
{
"exit_code": 1,
"names": [
"<http://99999999.dkr.ecr.us-east-1.amazonaws.com/example/image:latest|99999999.dkr.ecr.us-east-1.amazonaws.com/example/image:latest>"
],
"published": false,
"publisher": "docker",
"registries": [
"<http://99999999.dkr.ecr.us-east-1.amazonaws.com|99999999.dkr.ecr.us-east-1.amazonaws.com>"
],
"status": "failed",
"target": "src/docker/hello_world:python"
}
]
11:31:38.63 [DEBUG] Completed: `publish` goal
Built and published fine (i.e. publish failed due to auth, naturally) but no delays or other errors.
Using this BUILD target:
docker_image(
name="python",
source="Dockerfile.python",
repository="example/image",
registries=["<http://99999999.dkr.ecr.us-east-1.amazonaws.com|99999999.dkr.ecr.us-east-1.amazonaws.com>"],
)
and no docker related config in pants.toml
or env or rc files.nutritious-hair-72580
01/13/2022, 11:09 AMmain
with ./pants publish testprojects/src/python/docker/Dockerfile.example
. Can try again with local 2.9.0 build.docker_image(
name="test-example",
image_tags=["1.2.5"],
source="Dockerfile.example",
repository="example/image",
registries=["public.ecr.aws"],
)
curved-television-6568
01/13/2022, 11:48 AMsh
in that case, and since we’re sandboxed, sh
is not available on $PATH
.12:53:37.76 [INFO] Built docker image: public.ecr.aws/example/image:latest
12:53:37.76 [TRACE] Completed: pants.backend.docker.goals.publish.push_docker_images
12:53:37.76 [TRACE] Completed: pants.core.goals.publish.package_for_publish
The push refers to repository [public.ecr.aws/example/image]
cf8c8c8b5a23: Preparing
d09836256ed7: Preparing
984d2bf694d9: Preparing
5e2d6061e5d9: Preparing
aedcb370b058: Preparing
c3a0d593ed24: Waiting
26a504e63be4: Waiting
8bf42db0de72: Waiting
31892cc314cb: Waiting
11936051f93b: Waiting
denied: Not Authorized
𐄂 public.ecr.aws/example/image:latest failed.
12:53:39.67 [DEBUG] Publish result data:
[
{
"exit_code": 1,
"names": [
"public.ecr.aws/example/image:latest"
],
"published": false,
"publisher": "docker",
"registries": [
"public.ecr.aws"
],
"status": "failed",
"target": "src/docker/hello_world:python"
}
]
12:53:39.67 [DEBUG] Completed: `publish` goal
nutritious-hair-72580
01/13/2022, 12:00 PMcurved-television-6568
01/13/2022, 12:01 PMsh
is one, but question is if that is enough..?docker-credential-ecr-login
nutritious-hair-72580
01/13/2022, 12:08 PM~/.aws/config
curved-television-6568
01/13/2022, 12:12 PMeager-dress-66405
02/02/2022, 12:00 AMdocker pull ...
before a ./pants package
curved-television-6568
02/02/2022, 7:27 AM