Fugo Takefusa
09/17/2025, 11:30 PMMarvin
09/17/2025, 11:30 PMMarvin
09/17/2025, 11:34 PMbuild step sets image_name to fugotakefusaptml/prefect-docker-repo:2 and also sets tag: local.
- That results in a combined image like fugotakefusaptml/prefect-docker-repo:2:local (two colons).
- When the Docker worker tries to parse the image, it hits parse_image_tag(...) which expects exactly one “:” and fails with “too many values to unpack (expected 2)”.
How to fix
Pick ONE of these patterns—do not include a tag in both image_name and tag.
Option A: Put the tag only in tag
build:
- prefect_docker.deployments.steps.build_docker_image:
id: build_image
requires: prefect-docker>=0.3.1
image_name: fugotakefusaptml/prefect-docker-repo
tag: 2 # or 'local' if you prefer
dockerfile: auto
# optional: if you want an extra tag, add it here AND in push
# additional_tags:
# - local
push:
- prefect_docker.deployments.steps.push_docker_image:
requires: prefect-docker>=0.3.1
image_name: '{{ build_image.image_name }}'
tag: '{{ build_image.tag }}'
# repeat any additional tags you want to push as well
# additional_tags:
# - local
deployments:
- name: deployment_test
flow_name: test_flow
entrypoint: data_flows/deploy_buy.py:buy
work_pool:
name: docker-worker-pool
job_variables:
image: '{{ build_image.image }}' # resolves to fugotakefusaptml/prefect-docker-repo:2
Option B: Put the tag only in image_name and remove tag
build:
- prefect_docker.deployments.steps.build_docker_image:
id: build_image
requires: prefect-docker>=0.3.1
image_name: fugotakefusaptml/prefect-docker-repo:2
dockerfile: auto
# optional extra tag
# additional_tags:
# - local
push:
- prefect_docker.deployments.steps.push_docker_image:
requires: prefect-docker>=0.3.1
image_name: '{{ build_image.image_name }}'
# no tag here if you put it in image_name above
# optional extra tag to push
# additional_tags:
# - local
deployments:
- name: deployment_test
flow_name: test_flow
entrypoint: data_flows/deploy_buy.py:buy
work_pool:
name: docker-worker-pool
job_variables:
image: '{{ build_image.image }}'
Notes
- {{ build_image.image }} is the combined repository:tag string and is the right value to use for job_variables.image.
- If you want to publish multiple tags (e.g., 2 and local), include additional_tags in both the build and push steps.
- Make sure the requires: lines in your YAML are not HTML-escaped; it should be prefect-docker>=0.3.1 (not >=).
Docs
- Prefect YAML and deployment steps: prefect.yaml reference
- Docker deployments (build/push and image usage): Deploying with Docker
If you update the YAML and redeploy (prefect deploy from the project root), the worker should be able to pull the image without that parsing error. If you still see issues, can you share the resolved image string that shows up in the worker logs right before the pull (e.g., “Pulling image …”)? That’ll help confirm it’s correct.