cloudblue / connect-eaas-core

Core repository for Conned Devops Extensions
Apache License 2.0
6 stars 3 forks source link

Allow multistage Dockerfile #103

Open FlorianIkarus opened 1 year ago

FlorianIkarus commented 1 year ago

As much as I understand the reason for verifying the Docker image name in the Dockerfile, the current approach makes multistage Dockerfiles impossible.

Example:

FROM cloudblueconnect/connect-extension-runner:28.7 AS build
...
FROM build AS deploy
...

Please modify the validation in connect/eaas/core/validation/validators/base.py/validate_docker_compose_yml, so that it removes the AS <stage name> part (if existing) of the FROM line and then compares it to the pre-calculated image name.

FlorianIkarus commented 1 year ago

For further information about multi-staging, please refer to the Docker manual: https://docs.docker.com/build/building/multi-stage/

Sainomori commented 1 year ago

Hi @FlorianIkarus ,

Thanks for sharing your concern. We're aware of the issue you've highlighted and its impact on multistage Dockerfiles. Our team is actively investigating a solution that provides better support for these scenarios.

Stay tuned for updates as we work to address this. Your feedback is greatly appreciated.