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

Bug: Build Config - Docker file path gets preferred over custom docker file #6049

Open
2 tasks done
yuvii opened this issue Nov 4, 2024 · 8 comments
Open
2 tasks done
Assignees
Labels
bug Something isn't working needs-triage Issue is not approved or ready-to-work on

Comments

@yuvii
Copy link

yuvii commented Nov 4, 2024

📜 Description

If there's a dockerfile path configured in the build stage, if you switch to "Create Dockerfile" option the deployment would still try to build from the file path provided.

👟 Reproduction steps

Create an app, in the build configuration enter a path for a Dockerfile, then switch to "Create Dockerfile". The deployment would then look for the file specified in the path, ignoring the created dockerfile.

image
image

👍 Expected behavior

The deployment should use the selected dockerfile, regardless if there are other values available

👎 Actual Behavior

Devtron picks the docker image from the path if a value is provided, ignoring what is actively selected.

☸ Kubernetes version

EKS 1.30

Cloud provider

AWS

🌍 Browser

Opera

🧱 Your Environment

No response

✅ Proposed Solution

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find any similar issue

🏢 Have you read the Code of Conduct?

@yuvii yuvii added the bug Something isn't working label Nov 4, 2024
@abhibhaw abhibhaw added the P0 label Nov 8, 2024
@deepak-devtron
Copy link
Contributor

Hi Yuval,
The custom Dockerfile feature is working as expected. However, to run the docker build command, the content needs to be saved in a file. Currently, the path is being picked from the 'I have Dockerfile' tab, which may not provide the best user experience. We appreciate your feedback and will consider this improvement in an upcoming release.

@abhibhaw abhibhaw removed the P0 label Nov 14, 2024
@abhibhaw
Copy link
Member

@yuvii are you experiencing the same as @deepak-devtron or something different?

@yuvii
Copy link
Author

yuvii commented Nov 21, 2024

@abhibhaw no. He didn't understand my issue. It's not a complaint about user experience, this is a genuine bug. I inputted a path to "I have a Dockerfile" option (let's call it option A), then I switched over to "Create Dockerfile" (option B). When I tried to run the pipeline, the build still tried to use the path from option A. It was only when I deleted the value from the path that it would use the created Dockerfile. It seems like the pipeline will always pick option A if there's any value in the path at all regardless if I have marked option B as my choice selection. If I'm selecting option B, it should never use option A even if it has values

@abhibhaw
Copy link
Member

Hey @yuvii we tried replicating this on latest devtron version but we didn't find the issue. Can you please confirm your devtron version?

@abhibhaw
Copy link
Member

Also @yuvii if u can confirm in your case option B's dockerfile is being used for final build or option A

@yuvii
Copy link
Author

yuvii commented Dec 16, 2024

Also @yuvii if u can confirm in your case option B's dockerfile is being used for final build or option A

I've since updated the version, I haven't tried recreating this issue,but I can try and check and see if it's still relevant

@satyampsoni satyampsoni added the needs-triage Issue is not approved or ready-to-work on label Dec 26, 2024
@satyampsoni
Copy link
Contributor

Hi @yuvii, have you had a chance to replicate this issue? Does it still persist, or do you need any further assistance from us?

@yuvii
Copy link
Author

yuvii commented Jan 5, 2025

@satyampsoni yes I've been able to recreate it. Just follow these steps:

  1. choose "I have a Dockerfile". input a fake path. Save.
  2. switch to "Create a Dockerfile" and save.
  3. Run build.

Even though "Create" option is selected, when running the build it looks for the Dockerfile path set in the first option that is currently not active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Issue is not approved or ready-to-work on
Projects
None yet
Development

No branches or pull requests

6 participants