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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile #5169

Merged
merged 1 commit into from
Oct 25, 2018
Merged

Add Dockerfile #5169

merged 1 commit into from
Oct 25, 2018

Conversation

sjackman
Copy link
Member

No description provided.

@sjackman sjackman self-assigned this Oct 24, 2018
Dockerfile Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved

RUN apt-get update \
&& apt-get install -y --no-install-recommends bzip2 ca-certificates curl file fonts-dejavu-core g++ git locales make openssh-client patch sudo uuid-runtime \
&& rm -rf /var/lib/apt/lists/*
Copy link
Member

Choose a reason for hiding this comment

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

What's this for? If cleaning: is there an apt command that can be used instead?

Copy link
Member

Choose a reason for hiding this comment

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

This is what they recommend as a best practice in the docker documentation. I'm not sure if there's an apt command that can be used instead; I've always seen it like this.

Copy link
Member Author

Choose a reason for hiding this comment

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

I would have expected apt-get clean to have an option to remove /var/lib/apt/lists, but I was not able to find such an option. See https://linux.die.net/man/8/apt-get


RUN localedef -i en_US -f UTF-8 en_US.UTF-8 \
&& useradd -m -s /bin/bash linuxbrew \
&& echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers
Copy link
Member

Choose a reason for hiding this comment

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

Is this standard practise for Docker?

Copy link
Member

Choose a reason for hiding this comment

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

I didn't see it recommended on the official docker website, but I see something similar here:

Copy link
Member Author

Choose a reason for hiding this comment

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

Standard practice for Docker is to leave the user as root, but brew refuses to run as root.

Minor style point, I can instead put this file in /etc/sudoers.d/. Any preference?

Copy link
Member

Choose a reason for hiding this comment

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

Minor style point, I can instead put this file in /etc/sudoers.d/. Any preference?

No preference from me; I defer.

Dockerfile Show resolved Hide resolved
@chdiza
Copy link
Contributor

chdiza commented Oct 24, 2018

I hope that this can instead be named .Dockerfile, so that users don't have this cluttering up the dir.

Same for the recently added azure thingy; can it be .azure-piplelines.yml instead?

The other CI/auxiliary support stuff in the root dir are all dotfiles: .travis.yml, .yardopts, .github, .editorconfig.

@MikeMcQuaid
Copy link
Member

I hope that this can instead be named .Dockerfile, so that users don't have this cluttering up the dir.

Same for the recently added azure thingy; can it be .azure-piplelines.yml instead?

We're using the default names for both because almost all tooling expects them to have those names. Now that this stuff isn't in the /usr/local root there's not a strong argument to me for needing to hide things away in this repository compared to a normal one.

Copy link
Member

@scpeters scpeters left a comment

Choose a reason for hiding this comment

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

brew doctor is clean now; nice work

@sjackman
Copy link
Member Author

brew tests and brew test-bot will be clean after PR #5180.
@scpeters Care to review this PR for me? I'll merge this PR after that one, and then set up Docker Hub to build the image on each commit.

@scpeters
Copy link
Member

Sure, I'll review it in between meetings today.

@sjackman sjackman merged commit b0e3e73 into Homebrew:master Oct 25, 2018
@sjackman sjackman deleted the dockerfile branch October 25, 2018 21:17
@sjackman
Copy link
Member Author

Merged! I'll set up a Docker Hub build now.

@sjackman
Copy link
Member Author

@scpeters
Copy link
Member

nice work! I was just experimenting with it and noticed a problem with the python@2 formula. Should I report that as an issue at https://github.com/Linuxbrew/homebrew-core/issues ?

@sjackman
Copy link
Member Author

Yes, please!

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

5 participants