Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dekorate.docker.docker-file only works if module root contains a Dockerfile #1000

Open
kabir opened this issue Jun 9, 2022 · 1 comment
Open
Assignees

Comments

@kabir
Copy link
Contributor

kabir commented Jun 9, 2022

When using dekorate.docker.registry=localhost:3000 and dekorate.docker.docker-file=src/main/resources/Dockerfile the registry only seems populated properly if there is a file in the module root called Dockerfile.

In the generated META-INF/dekorate/kubernetes.yaml, the presence of a Dockerfile in the module root seems to have an impact on what registry is used for the image in the kubernetes.yaml.

If there is a Dockerfile, as expected, kubernetes.yml contains:

          image: localhost:3000/kabir/issue-100-docker-registry-docker-file-needs-Dockerfile:2.9-SNAPSHOT

If there is no Dockerfile, kubernetes.yml contains the following instead (note 'localhost:3000' is now 'kabir' instead):

          image: kabir/issue-100-docker-registry-docker-file-needs-Dockerfile:2.9-SNAPSHOT

In both cases the generated docker.yml contains the following information (which is correct as far as I can tell):

registry: localhost:3000
dockerFile: src/main/resources/Dockerfile

I've added a test demonstrating the behaviour at https://github.com/dekorateio/dekorate/compare/main...kabir:issue-1000%3Dtest?expand=1. This is an adjusted copy of issue-420-docker-registry.

As-is, it will fail. If you rename _Dockerfile to Dockerfile, it passes. Something seems to be going on during the merging and generating the Kubernetes manifest, but I can't quite put my finger on what is going wrong.

kabir added a commit to kabir/dekorate that referenced this issue Jun 9, 2022
@iocanel
Copy link
Member

iocanel commented Jun 9, 2022

reproduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants