Hi all, Trying to build and deploy a docker image ...
# general
w
Hi all, Trying to build and deploy a docker image via
awsx
but keep getting this error:
Copy code
docker-build:index:Image (forge-kernel):
    #0 building with "naughty_herschel" instance using docker-container driver
    
    #1 [internal] load build definition from Dockerfile
    #1 transferring dockerfile: 2.21kB done
    #1 DONE 0.0s
    
    #2 [internal] load metadata for public.ecr.aws/docker/library/python:3.10.16-slim
    #2 ERROR: failed to do request: Head "<https://public.ecr.aws/v2/docker/library/python/manifests/3.10.16-slim>": tls: failed to verify certificate: x509: certificate signed by unknown authority
    error: failed to solve: public.ecr.aws/docker/library/python:3.10.16-slim: failed to resolve source metadata for public.ecr.aws/docker/library/python:3.10.16-slim: failed to do request: Head "<https://public.ecr.aws/v2/docker/library/python/manifests/3.10.16-slim>": tls: failed to verify certificate: x509: certificate signed by unknown authority
This is the pulumi code:
Copy code
ecr_repo = awsx.ecr.Repository(
    resource_name=f"{env}-research-kernel-repo",
    name=f"{env}-research-kernel-repo",
    force_delete=True)



image = awsx.ecr.Image(
    resource_name=f"{env}-research-kernel-image",
    # image_name=ecr_repo.url,
    context="src",
    dockerfile="./src/Dockerfile",
    image_name="forge-kernel",
    image_tag="0.1.0",
    # platform="linux/amd64",
    repository_url=ecr_repo.url,
)
when I build the image with docker cli, it works fine, but when I run the pulumi code, it fails... this is not my first Pulumi set up and everything else works fine. Dockerfile:
Copy code
FROM public.ecr.aws/docker/library/python:3.10.16-slim


WORKDIR /app

COPY requirements.txt ./requirements.txt

RUN sudo apt-get update && sudo apt-get install --only-upgrade ca-certificates
RUN pip install --upgrade pip
RUN pip install --trusted-host <http://pypi.org|pypi.org> --trusted-host <http://files.pythonhosted.org|files.pythonhosted.org> -r ./requirements.txt


RUN python -m ipykernel install --sys-prefix --name forge-kernel --display-name "Python (forge-kernel)"
q
How are you building the image using the docker cli? Are you using buildkit (i.e.
docker buildx build ...
)