Troubleshooting Nautobot As A Docker Container Docker Compose Not Found
Table of Contents
Summary
Just ran into an issue with deploying the Docker container for Nautobot on Ubuntu 24.04 LTS. Kept outputing the docker help everytime I would run invoke.
Solution
The solution was to edit the invoke task for invoke.py and set it to docker-compose and not docker compose.
Needed to change the docker_compose function so the compose command was docker-compose and not docker compose. after the update Invoke would run the command with no issue.
diff --git a/tasks.py b/tasks.py
index 3e3c043..9f49fdf 100644
--- a/tasks.py
+++ b/tasks.py
@@ -88,7 +88,7 @@ def docker_compose(context, command, **kwargs):
"PYTHON_VER": context.nautobot_docker_compose.python_ver,
"NAUTOBOT_VERSION": NAUTOBOT_VERSION,
}
- compose_command = f'docker compose --project-name {context.nautobot_docker_compose.project_name} --project-directory "{context.nautobot_docker_compose.compose_dir}"'
+ compose_command = f'docker-compose -p {context.nautobot_docker_compose.project_name} --project-directory "{context.nautobot_docker_compose.compose_dir}"'
for compose_file in context.nautobot_docker_compose.compose_files:
compose_file_path = os.path.join(
context.nautobot_docker_compose.compose_dir, compose_file