Does anyone know if there is something wrong with ...
# ask-community
b
Does anyone know if there is something wrong with the ability for Prefect to build a proper Docker image now? I'm suddenly having issues on two (similar) machines - It was working in the past. I'm using a Prefect ECS Push Work Pool. It was created by the command line util to intialize an environment. 1. I'm on an apple M2 Mac. (Arm) 2. My image is building with
linux/amd64
(again - this worked in the past) 3. When I run this file, the base prefect image only partially pulls from Docker Hub and then the build fails . 4. I can manually re-pull the base image via docker desktop and it will then finally complete the full build 5. After the upload to ECR is complete and when I run the Flow, I get the following error. It's like it's not able to properly build my image before pushing. Error Message (From AWS ECS Task)
CannotPullContainerError: ref pull has been retried 1 time(s): wrong diff id calculated on extraction "sha256:c0f1022b22a9b36851b358f44e5475e39d166e71a8073cf53c894a299239b1c5"
Prefect Version
Copy code
Version:             3.1.8
API version:         0.8.4
Python version:      3.11.11
Git commit:          53a83ebc
Built:               Tue, Dec 17, 2024 10:20 AM
OS/Arch:             darwin/arm64
Profile:             default
Server type:         cloud
Pydantic version:    2.10.4
Integrations:
  prefect-docker:    0.6.2
  prefect-slack:     0.3.1
  prefect-snowflake: 0.28.1
  prefect-aws:       0.5.3
  prefect-github:    0.3.1
  prefect-shell:     0.3.1
Docker File (Auto-Created)
Copy code
FROM prefecthq/prefect:3.1.8-python3.11
COPY requirements.txt /opt/prefect/prefect-dka/requirements.txt
RUN python -m pip install -r /opt/prefect/prefect-dka/requirements.txt
COPY . /opt/prefect/prefect-dka/
WORKDIR /opt/prefect/prefect-dka/
Deploy Code
Copy code
if __name__ == "__main__":
    status_check.deploy(
        name="status-check-ecs-deployment",
        work_pool_name="dka-ecs-pool",
        cron="0 17 * * *",
        build=True,
        push=True,
        image=DockerImage(
            name="<<my arn>>.dkr.ecr.us-east-1.amazonaws.com/prefect-flows:latest",
            platform="linux/amd64",
        ),
    )
b
Hi Brian! I think this is the first report we've seen of this. When did it stop working for you? Was it after changing your version of Prefect?
b
I don't update this that often, but I did a successful build of this on Dec 7th. and then I made some changes during our certification class this week based on what I learned. I can't for the life of me figure out if it's environmental or other.
k
b
@Kevin Trebing @Bianca Hoch I feel like Docker recently updated something that allowed for containers to support multiple CPU architectures at the same time - given i'm running on a Mac for the build which is on ARM but the AWS arch needs linux/amd64 - I wonder if this is causing the issue? I can't find the article on this - but it popped up for me in Docker desktop maybe a few weeks before this issue started.
🤔 1
I can't tell when this was released. I think it might have been a while ago but I most certainly used to see more platform based errors than I do now. https://docs.docker.com/build/building/multi-platform/
FYI - As a work around I got mine running in a Managed workpool for now. I'll keep trying to debug this but no progress so far.
b
Thanks for the update Brian! I'll keep and eye out to see if this comes up in the wild, and try to replicate this myself