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

Dockerfile: use relative paths when in the /home/linuxbrew directory #11819

Merged
merged 1 commit into from Aug 17, 2021
Merged

Dockerfile: use relative paths when in the /home/linuxbrew directory #11819

merged 1 commit into from Aug 17, 2021

Conversation

sudoforge
Copy link

@sudoforge sudoforge commented Aug 4, 2021

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Dockerfile: use relative paths when in the /home/linuxbrew directory

Because the `WORKDIR` instruction specifies the home directory of the
`linuxbrew` user, there is no need to use absolute paths to reference
paths within the home directory, nor is there a need to call `cd` (this
is actually an anti-pattern [0]) to move into a subdirectory before
creating folders.

[0]: https://github.com/hadolint/hadolint/wiki/DL3003

THIS PR DEPENDS ON #11815 AND #11818 . DO NOT MERGE UNTIL IT IS MARKED READY

@dawidd6
Copy link
Member

dawidd6 commented Aug 10, 2021

Could you rebase on latest master?

@sudoforge sudoforge marked this pull request as ready for review August 12, 2021 19:54
Because the `WORKDIR` instruction specifies the home directory of the
`linuxbrew` user, there is no need to use absolute paths to reference
paths within the home directory, nor is there a need to call `cd` (this
is actually an anti-pattern [0]) to move into a subdirectory before
creating folders.

[0]: https://github.com/hadolint/hadolint/wiki/DL3003
@MikeMcQuaid MikeMcQuaid merged commit 2b82664 into Homebrew:master Aug 17, 2021
@MikeMcQuaid
Copy link
Member

Thanks again @sudoforge!

@sudoforge
Copy link
Author

Happy to help make things a touch easier :)

iMichka added a commit that referenced this pull request Aug 18, 2021
iMichka added a commit that referenced this pull request Aug 18, 2021
Dockerfile: revert the revert of #11818 and #11819
@sudoforge sudoforge deleted the docker-relative-paths branch September 4, 2021 16:41
@github-actions github-actions bot added the outdated PR was locked due to age label Oct 5, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants