average-breakfast-91545
05/16/2023, 3:02 PMdocker_environment(
name="aws_lambda_python39",
platform="linux_x86_64",
image="public.ecr.aws/lambda/python:3.9",
)
pex_binary(
name="flagger",
layout="zipapp",
inherit_path="fallback",
dependencies=["src/dz/anomaly_flagger/handler.py"],
environment="aws_lambda_python39",
)
pants package is failing with
Failed to create Docker execution in container: RequestTimeoutError
I am able to to docker run --platform=linux/x86_64 public.ecr.aws/lambda/python:3.9
on the machine, and I've got no clue what request is timing out, nor why. Any idea how to proceed?fast-belgium-77939
05/16/2023, 6:59 PMpants
cannot pull public.ecr.aws/lambda/python:3.9
when preparing a docker_environment
target, throwing the following error:
Error: 2.64 [ERROR] 1 Exception encountered:
Engine traceback:
in `package` goal
in Building local distributions - environment:aws_lambda_python39
Exception: Failed to pull image `public.ecr.aws/lambda/python:3.9`: Failed to pull Docker image `public.ecr.aws/lambda/python:3.9`: Failed to retrieve credentials for server `public.ecr.aws`: User has no credential configured
Running docker pull --platform linux/amd64 public.ecr.aws/lambda/python:3.9
before pants package
fixes the issue, so clearly there’s some login shenanigans that might be going wrong?enough-analyst-54434
05/16/2023, 7:01 PMdocker_environment
.)witty-crayon-22786
05/16/2023, 7:27 PMdocker_environment
was added in https://github.com/pantsbuild/pants/pull/18541, but i wouldn’t be surprised if there are still issues there. if you can file a repro i can take a look.fast-belgium-77939
05/17/2023, 9:16 AMancient-terabyte-9085
05/18/2023, 8:59 PMwitty-crayon-22786
05/18/2023, 9:01 PMancient-terabyte-9085
05/18/2023, 9:04 PMHOME
injection for containerized jobs (or whatever it's doing) is making Pants unable to find the docker config file.
DOCKER_CONFIG=%(homedir)s/.docker
did not resolve properly but a hardcoded
DOCKER_CONFIG=/github/home/.docker
seems to be working. I'm hoping that release candidate fixes the issue so I don't need to hardcode things, will update 🤞witty-crayon-22786
05/18/2023, 9:06 PMancient-terabyte-9085
05/18/2023, 9:14 PM