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

[0.9.0] Set build context default to Dockerfile dir #1184

Merged
merged 9 commits into from
Sep 21, 2021

Conversation

anukul
Copy link
Contributor

@anukul anukul commented Sep 7, 2021

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Other (please describe): Spec change

Pull request checklist

Please check if your PR fulfills the following requirements:

  • If it's a backend change, tests for the changes have been added and go test ./... runs successfully from the root folder.
  • If it's a frontend change, Prettier has been run
  • Docs have been reviewed and added / updated if needed

What is the current behavior?

Docker build context default is set to repository root

What is the new behavior?

Docker build context default is set to directory containing Dockerfile

Technical Spec/Implementation Notes

TODO: Allow setting build context from dashboard

@anukul anukul requested a review from abelanger5 September 7, 2021 19:28
Copy link
Contributor

@abelanger5 abelanger5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @anukul, just one minor thing to resolve 👍

@@ -223,6 +227,10 @@ func handleSubdomainCreate(subdomain string, err error) error {
}

func createFromGithub(createAgent *deploy.CreateAgent, overrideValues map[string]interface{}) error {
if localPath == "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is createFull the only method that calls createFromGithub? If so, we can remove this right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right.. fixed, thanks.

@anukul anukul requested a review from abelanger5 September 7, 2021 19:50
@anukul anukul changed the title Set build context default to Dockerfile dir [0.9.0] Set build context default to Dockerfile dir Sep 9, 2021
@igalakhov
Copy link
Contributor

igalakhov commented Sep 17, 2021

Hi @anukul - seems like everything is working well! One slight problem is that (as mentioned in issue #1186) the auto buildpack doesn't work for folders for some reason. I get this error specifically:

Error: invalid app path 'src/': evaluate symlink: lstat src: no such file or directory

After some investigation, it seems like this happens due to Docker - I suspect something with symlinks is done to build and the way we pull/store the repository breaks things (note: I tested with absolute paths and that has the same issue). The exact line of code that fails is this one (this is in library code):

if resolvedAppPath, err = filepath.EvalSymlinks(appPath); err != nil {
		return "", errors.Wrap(err, "evaluate symlink")
	}

@abelanger5 abelanger5 merged commit 4bb78b3 into master Sep 21, 2021
@abelanger5 abelanger5 deleted the docker-build-context branch October 26, 2022 20:15
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

Successfully merging this pull request may close these issues.

3 participants