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: do not chown linuxbrew folder #5752

Merged
merged 1 commit into from
Feb 16, 2019
Merged

Conversation

iMichka
Copy link
Member

@iMichka iMichka commented Feb 16, 2019

The linuxbrew user has been removed from the Dockerfile

  • 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 tests with your changes locally?

The linuxbrew user has been removed from the Dockerfile
@iMichka iMichka self-assigned this Feb 16, 2019
@iMichka
Copy link
Member Author

iMichka commented Feb 16, 2019

This should fix the error in the latest docker hub build:

Step 9/9 : RUN HOMEBREW_NO_ANALYTICS=1 HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/core && rm -rf ~/.cache
---> Using cache
---> 3ffb2a60da6d
Successfully built 3ffb2a60da6d
Successfully tagged b5ykqxe3xtpfwkomvyo4xw6_sut:latest
Creating b5ykqxe3xtpfwkomvyo4xw6_sut_1 ...
Creating b5ykqxe3xtpfwkomvyo4xw6_sut_1 ... done
Error: Can't create update lock in /home/linuxbrew/.linuxbrew/var/homebrew/locks!
Fix permissions by running:
sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew

@MikeMcQuaid MikeMcQuaid merged commit 1f94475 into Homebrew:master Feb 16, 2019
@MikeMcQuaid
Copy link
Member

Thanks @iMichka! What commands do Dockerhub run? I wonder if it's worth running them in our CI (and possibly even running brew test-bot in the Docker image)?

@iMichka iMichka deleted the chown branch February 16, 2019 10:37
@iMichka
Copy link
Member Author

iMichka commented Feb 16, 2019

I think it just runs docker build on the dockerfile to build the image.

We could probably add this to the brew build on pull requests, but the builds are quite (this build has to even started right now, docker hub seems to be really slow). So the only way to know something is broken at the moment is to monitor https://hub.docker.com/r/linuxbrew/brew/builds. Failed builds are not displayed, you need to be logged in to see the logs ...

@sjackman
Copy link
Contributor

The linuxbrew user still exists, though the default user is now root. I had intentionally left /home/linuxbrew owned by the linuxbrew user, so that downstream Docker images can add USER linuxbrew to run as the linuxbrew user, if their workflow depends on that. That's still possible, but they'll need to add…

RUN chown -R linuxbrew: /home/linuxbrew/.linuxbrew
USER linuxbrew

(mostly documenting this for myself)

The root user should always have write access to /home/linuxbrew/.linuxbrew regardless of its ownership.

@lock lock bot added the outdated PR was locked due to age label Mar 18, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 18, 2019
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.

3 participants