Commit Graph

69 Commits

Author SHA1 Message Date
Carlo Cabrera
04b89c0ff7
Dockerfile: fix style failure
See https://www.shellcheck.net/wiki/SC2174.
2024-09-06 22:49:18 +08:00
Carlo Cabrera
603f45a97f
Dockerfile: align gh installation with upstream documentation
The commands to install `gh` were changed in cli/cli#8693.

We should align what we do there to make what's happening here a bit
more transparent.
2024-09-06 22:42:05 +08:00
Andrei Neculau
bc8c7a2a16
docker: revert back linuxbrew's UID to 1000
In https://github.com/Homebrew/brew/pull/17584 we have changed "linuxbrew" user's UID/GID to 1001 in order to mitigate for Ubuntu 23.04 and higher, which started creating a default "ubuntu" user taking over UID/GID 1000 .

While we may desire a deterministic UID in the homebrew docker image, the change effectively modified the behaviour for all current 3 images based on Ubuntu 18.04 20.04 and 22.04 by changing the linuxbrew's user UID/GID from 1000 to 1001. As per https://hub.docker.com/u/homebrew, we do not currently publish an image for 24.04 which the change is mitigating for.

Rather than mitigating for indeterministic behaviour of upstream changes, this commit implements the workaround in https://bugs.launchpad.net/cloud-images/+bug/2005129 to delete the default "ubuntu" user.
2024-07-09 21:29:49 +02:00
Marcos Lilljedahl
d542f795bb
ci: improve Dockerfile to make proper use of build cache
Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
2024-06-30 21:42:07 -03:00
Bo Anderson
9872572688
Dockerfile: drop libz-dev 2024-05-17 12:33:31 +01:00
Bo Anderson
489879ff72
Enable Ruby 3 for all users 2023-11-29 15:30:17 +00:00
Bo Anderson
54abce335e
Dockerfile: set XDG_CACHE_HOME to fix umask in GitHub Actions 2023-11-21 23:44:16 +00:00
Bo Anderson
189d709c41
Merge pull request #16241 from Bo98/ruby3-developers
Enable Ruby 3 for `HOMEBREW_DEVELOPER` and the Docker image
2023-11-21 23:40:31 +00:00
Bo Anderson
559336c771
Enable Ruby 3 for HOMEBREW_DEVELOPER 2023-11-20 20:04:18 +00:00
Bo Anderson
9c1c116804
Dockerfile: fix default umask 2023-11-20 18:54:58 +00:00
Bo Anderson
3b1c171184
Further split up Gemfile into groups 2023-09-27 17:33:44 +01:00
Bo Anderson
623eeb4e47
cmd/update-report: tweak messages for CI 2023-07-07 21:10:21 +01:00
Bo Anderson
8d1aabba81
tap: warn if tapping core taps under API mode 2023-07-05 21:57:00 +01:00
Carlo Cabrera
51cdf49c47
Dockerfile: set umask in common-session-noninteractive too
See #15505.
2023-06-05 13:39:42 +08:00
Carlo Cabrera
86390348ac
Dockerfile: set default umask
This makes sure that the system `umask` is the same as the one on macOS.

Fixes Homebrew/homebrew-core@155e3ab5a8.
2023-06-01 13:58:33 +08:00
Carlo Cabrera
e392bbc0e2
Install gh from GitHub Debian repository 2023-04-21 18:01:08 +08:00
Carlo Cabrera
40d5ba577f
Dockerfile: install gh from Homebrew
apt installs an ancient `gh` that is missing some important flags. In
particular, we probably do want the `--match-head-commit` flag for the
extra security it gives us.
2023-04-21 17:32:42 +08:00
Mike McQuaid
6a77ef2170
docker: stop building Ubuntu 16.04 image.
This is too slow to be building every time and we're long past the
deprecation date.

Fixes https://github.com/Homebrew/brew/issues/14661
2023-03-24 08:57:48 +00:00
Sebastian Pipping
05319c86dc Dockerfile: Install gpg (GnuPG 2.x) for Ubuntu 18 and 20 also 2023-03-24 05:42:33 +01:00
Sebastian Pipping
51f171e506 Dockerfile: Fix the build, package gh exists in Ubuntu >=22 only 2023-03-23 20:38:08 +01:00
Carlo Cabrera
3b044a8113
Fix brew style 2023-03-16 01:19:54 +08:00
Carlo Cabrera
ff285217da
Use --no-install-recommends
Co-authored-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2023-03-16 01:09:20 +08:00
Carlo Cabrera
60b1cb7afd
Dockerfile: remove bash-ism 2023-03-16 01:07:19 +08:00
Carlo Cabrera
9ad7f91801
Dockerfile: fix installation of gh, et al.
Needed for Homebrew/homebrew-core#125556.
2023-03-16 00:44:18 +08:00
Mike McQuaid
ed38bf1061
Dockerfile: fix build of Ubuntu 18.04 image.
Some of these packages are only available on newer versions.
2023-03-14 12:25:00 -04:00
Mike McQuaid
b43523c81f
Dockerfile: apt-get install more useful things
We need all of these in various homebrew/core workflows.
2023-03-14 06:53:02 -04:00
Mike McQuaid
08644386e1
Dockerfile: cleanup style, add comments. 2022-12-13 11:37:05 +00:00
Bo Anderson
8b6fbbaa2b
Dockerfile: install acl 2022-12-03 05:31:37 +00:00
Bo Anderson
2acabcae0d
Dockerfile: install gpg 2022-11-30 19:16:06 +00:00
Mike McQuaid
6990e5f537
Dockerfile: install jq.
It's a small dependency and makes it easier to do scripting.
2022-11-09 15:32:12 +00:00
Bo Anderson
3ddcf765d2
workflows/docker: base homebrew/brew on 22.04
Also disable fail-fast so that if a image upload fails we don't stop the other uploads halfway.
2022-04-28 21:21:40 +01:00
Dawid Dziurla
1d04f44272
Dockerfile: it's gnupg not gpg on 16.04 2022-04-25 07:59:51 +02:00
Dawid Dziurla
6797cd3dcb
Dockerfile: leave gpg-agent installed 2022-04-25 07:56:36 +02:00
Dawid Dziurla
e75218c0e9
Dockerfile: yes apt 2022-04-24 23:31:03 +02:00
Dawid Dziurla
7d1a97f015
Dockerfile: purge unneeded packages 2022-04-24 23:25:30 +02:00
Dawid Dziurla
ac57c4bb89
Dockerfile: gpg-agent only 2022-04-24 23:05:46 +02:00
Dawid Dziurla
7972c332e8
Dockerfile: install gpg 2022-04-24 22:46:31 +02:00
Dawid Dziurla
7ffaaf8c9a
Dockerfile: install gpg agent 2022-04-24 22:43:09 +02:00
Dawid Dziurla
9fab6ae7d9
Dockerfile: install gnupg 2022-04-24 22:39:03 +02:00
XuehaiPan
bc0663baba style: brew style check Dockerfile as shell script 2021-09-15 15:00:23 +08:00
XuehaiPan
3f96d963f7 style: fix inconsistent code style for shell scripts 2021-09-15 14:59:01 +08:00
Michka Popoff
f89b883156
Revert "Revert "Dockerfile: use relative paths when in the /home/linuxbrew directory""
This reverts commit 6d61fb03cd.
2021-08-18 16:55:05 +02:00
Michka Popoff
5ef770d6a4
Revert "Revert "Dockerfile: remove extraneous permission modification commands""
This reverts commit 58937ae1b6.
2021-08-18 16:54:50 +02:00
Michka Popoff
58937ae1b6
Revert "Dockerfile: remove extraneous permission modification commands"
This reverts commit ae14ab0ba0.
2021-08-18 12:39:10 +02:00
Michka Popoff
6d61fb03cd
Revert "Dockerfile: use relative paths when in the /home/linuxbrew directory"
This reverts commit 65a755a160.
2021-08-18 12:39:05 +02:00
Benjamin Denhartog
65a755a160
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
2021-08-13 23:53:49 -06:00
Benjamin Denhartog
ae14ab0ba0
Dockerfile: remove extraneous permission modification commands
These are no longer necessary due to the fact that the second `RUN`
instruction runs as the `linuxbrew` user (as of commit
77afe94446).
2021-08-11 11:22:07 -06:00
Benjamin Denhartog
77afe94446
Dockerfile: run as user: linuxbrew
This commit refactors the Dockerfile in order to resolve build errors
caused by attempting to execute `brew` commands as the root user. We
need to create the `/home/linuxbrew/.linuxbrew` folder prior to copying
the local directory into `/home/linuxbrew/.linuxbrew/Homebrew` (and
ensure the appropriate user owns it), as failing to do so will create
`/home/linuxbrew/.linuxbrew` with root user and group ownership, causing
the subsequent `mkdir` command called in the second `RUN` instruction to
fail.

closes #11802
2021-08-03 17:56:21 -06:00
Michka Popoff
31a95d21be
Dockerfile: add gawk dependency
This is needed to build glibc on CI
2021-02-27 22:56:48 +01:00
Mike McQuaid
637ec77438
Dockerfile: run git fetch.
This should setup `origin/master` correctly for
https://github.com/Homebrew/homebrew-test-bot/pull/424.
2020-06-12 09:10:42 +01:00