-
Notifications
You must be signed in to change notification settings - Fork 428
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
feat(cli): add prompt for custom path if Dockerfile not found #1341
Conversation
Before:
|
After [load balanced web service with a relative path]:
How the path is rendered in the manifest:
After [backend service with an absolute path]:
How the path is rendered in the manifest:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for this! This is going to be super helpful.
Oh, another comment on the syntax here-- In your example, we have a customer entering |
Ah, you were right! |
Aha! So it seems like we need to get the current directory, get the copilot directory, and use that information plus the provided relative Dockerfile path to generate the relative path from the workspace root to the Dockerfile. So:
Does that make sense? Also, what are the paths in question in your example? Where in the repo were you running this command, vs the absolute path of the Dockerfile? |
Co-authored-by: Efe Karakus <[email protected]>
Co-authored-by: Efe Karakus <[email protected]>
Co-authored-by: Efe Karakus <[email protected]>
Co-authored-by: Efe Karakus <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Previously, if a service's Dockerfile could not be found in the current directory or subdirectory one level down, `svc init` would throw an error. With these changes, users are prompted to input a custom path to their Dockerfiles (similar to the `--dockerfile` flag) at the point that they would otherwise be selecting from a list of found Dockerfiles. Fixes aws#1167. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Previously, if a service's Dockerfile could not be found in the current directory or subdirectory one level down,
svc init
would throw an error. With these changes, users are prompted to input a custom path to their Dockerfiles (similar to the--dockerfile
flag) at the point that they would otherwise be selecting from a list of found Dockerfiles.Fixes #1167.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.