Docker Compose limitations
While docker-compose files are a powerful tool for managing multi-container applications, they can encounter limitations within the Barbara Panel environment. This article delves into these limitations, providing valuable insights for developers working with containerized applications in Barbara.
By understanding the potential roadblocks associated with docker-compose files, you can effectively use the Barbara Panel ecosystem and ensure a smooth deployment process for your containerized applications.
Restart Policy
Quotation marks are required around the value "no" for the restart policy.
- Incorrect
- Correct
service-name:
image: ${SERVICE_IMAGE:-service-xxx:latest}
restart: no
service-name:
image: ${SERVICE_IMAGE:-service-xxx:latest}
restart: "no"
Name Property
Omit the name property within docker-compose files.
- Incorrect
- Correct
name: customName
networks:
...
networks:
...
TTY Property
Exclude the tty property from your docker-compose configuration.
- Incorrect
- Correct
service-name:
image: ${SERVICE_IMAGE:-service-xxx:latest}
tty: true
service-name:
image: ${SERVICE_IMAGE:-service-xxx:latest}
ENV_FILE Property
Set the env_file value on a separate line using hyphens (-).
- Incorrect
- Correct
service-name:
image: ${SERVICE_IMAGE:-service-xxx:latest}
env_file: user.env
service-name:
image: ${SERVICE_IMAGE:-service-xxx:latest}
env_file:
- user.env