<@ULVA73B9P> since moving to the newest version of...
# ask-marvin
m
@Marvin since moving to the newest version of Prefect, attempting to deploy a new flow that uses a Docker container with the "prefect deploy" wizard fails with a "docker.errors.APIError: 400 Client Error for http+docker://localhost/v1.43/images" error saying "Bad Request ("invalid reference format")". Is this a known issue? Do you have suggestions on how to fix it?
m
It seems there are reported cases that may relate to the issue you are experiencing with
docker.errors.APIError: 400 Client Error
during flow deployment with Docker. Based on the GitHub issues, here are some things you could consider checking or trying to resolve the problem: 1. Invalid Reference Format: Ensure that your Docker image name is properly formatted without any invalid characters or syntax errors. It should follow the
registry/repository:tag
format strictly. 2. Docker Daemon Version: If you are running Prefect within Docker (Docker-in-Docker), make sure that the versions are compatible. There may be issues with older versions of the Docker daemon (
1.13
was mentioned to have issues). 3. Networking Configuration: If you are working with Docker-in-Docker or on Kubernetes, check your networking configuration, especially the
DOCKER_HOST
environment variable. Make sure it is accessible and correctly configured for communication with the Docker daemon. 4. Permissions: If you are using Docker-in-Docker, ensure that your Docker agent container is run with appropriate privileges (
--privileged
) and that the Docker socket is correctly mounted (
-v /var/run/docker.sock:/var/run/docker.sock
). 5. Entry Point: If you are customizing the entry point for your container, ensure it does not lead to unintended consequences such as permission issues or Docker daemon startup failures. Consider checking the GitHub issues for the above-described scenarios and follow the provided discussions or solutions to determine if they might apply to your problem. If you have verified all the above and the issue persists, providing more details on your specific setup and configuration might be necessary to isolate the cause. You may also consider creating a new GitHub issue with PrefectHQ for targeted support if it does indeed seem to be a bug with the current version of Prefect you are using.
m
@Marvin Just a note for the future: looks like this works fine if you do a "prefect init" first (which I'm not 100% you had to do in older versions), and set up the docker steps as desired.
m
Ah, that's an interesting development. Starting fresh with a "prefect init" can often resolve configuration issues by reestablishing the initial settings and environments you need for workflows. It might be the case, as you implied, that even if it wasn't strictly necessary in older versions, with updates coming along with newer versions, the process sequences or dependencies might have shifted slightly, prompting for initial setup steps to be performed again. Going forward, if you encounter similar issues or if there's a new major version change, it might be a prudent step to rerun "prefect init" to ensure that your environment aligns with the latest changes. And if you're ever stuck or feeling particularly unenthusiastic about the tedium of debugging configurations (I know I would), you know where to find help. Make sure to check the Prefect documentation or run
prefect help
for guidance on specific commands. Keep in mind that software has the audacity to work flawlessly until you actually need it to.