51 Commits

Author SHA1 Message Date
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 6d61fb03cd0da78b41dc0d66663a6e3abf224276.
2021-08-18 16:55:05 +02:00
Michka Popoff
5ef770d6a4
Revert "Revert "Dockerfile: remove extraneous permission modification commands""
This reverts commit 58937ae1b6202ac7ca00d0cfaefeb826ed4f4c86.
2021-08-18 16:54:50 +02:00
Michka Popoff
58937ae1b6
Revert "Dockerfile: remove extraneous permission modification commands"
This reverts commit ae14ab0ba0d3eb574b7ed0a3a387b975f7975be8.
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 65a755a16079ee4fc507d95de0e8725bb05621f0.
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
77afe94446e78e688ebde7a5e2b1249fc0a4afcd).
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
Shaun Jackman
1c0c6217e2 Dockerfile: Unset gc.auto and homebrew.devcmdrun 2020-05-25 17:29:58 -07:00
Shaun Jackman
0c8a7b0488 Base homebrew/brew Docker image on ubuntu:20.04
Add a new image homebrew/ubuntu16.04 for building Linux bottles.
Tag the most recent stable release of each image as latest.
2020-05-20 22:11:42 -07:00
Bo Anderson
5935da6c6c Dockerfile: restore git-core PPA 2020-05-03 14:29:09 +01:00
Shaun Jackman
5052f49f40 Build Docker images for Ubuntu 18.04 and 20.04 2020-05-02 21:04:08 -07:00
Issy Long
785f3ab464
Dockerfile: Tabs to spaces
- My editor converted some of these to spaces when I changed the lines
  in the previous commit. We should be consistent, so I made all of them
  into spaces.
2020-04-26 09:55:14 +01:00
Issy Long
9baebbe38a
Lint the homebrew/brew Dockerfile with hadolint
- I suggested this for the contents of
  [Linuxbrew/docker](https://github.com/Linuxbrew/docker) in
  https://github.com/Linuxbrew/docker/issues/75. People agreed, and
  Shaun asked me to do the same here.
- This adds a step to CI to lint the Dockerfile, via
  [hadolint](https://github.com/hadolint/hadolint), on Ubuntu.
- The linting errors it surfaced on this Dockerfile were:

```
Dockerfile:4 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
Dockerfile:30 DL3020 Use COPY instead of ADD for files and folders
Dockerfile:32 DL3003 Use WORKDIR to switch to a directory
```

- [DL3008](https://github.com/hadolint/hadolint/wiki/DL3008) - pinning
  versions in `apt-get install` - is at odds with what we recommend in the
  normal Homebrew on Linux dependency install instructions. We don't
  want the dependency management of having to check each of these
  Dockerfiles periodically for the latest version numbers of packages
  and have to update them. So I've disabled this lint.

- [DL3003](https://github.com/hadolint/hadolint/wiki/DL3003) - use
  WORKDIR to `cd` - is disabled in this case due to [review
  comments](https://github.com/Homebrew/brew/pull/7433/files#r415098255).
2020-04-26 09:54:36 +01:00
Mike McQuaid
f2b8d4ec08
Dockerfile: use normal brew cleanup. 2020-02-05 19:31:59 +00:00
Jonathan Chang
efc27df4bd Dockerfile: changes to speed CI runs 2020-02-04 17:10:13 +01:00
Dawid Dziurla
22e72e842b
Dockerfile: install 'netbase' apt package 2020-01-26 14:01:39 +01:00
Dawid Dziurla
03028d57ce
Dockerfile: install tzdata apt package 2020-01-05 19:46:10 +01:00
Dawid Dziurla
b10e4f282d
Dockerfile: make the prefix group writable 2019-11-05 21:14:15 +01:00
Markus Reiter
85968040b1 Try caching the Docker image. 2019-08-21 06:55:15 +02:00
Mike McQuaid
8d6f30966b
Dockerfile: unset work writable permission.
Otherwise Ruby complains which is causing failing tests.
2019-04-01 09:37:47 +01:00
Mike McQuaid
5e42f67783
Dockerfile: install zlib headers (for nokogiri gem). 2019-02-22 17:23:33 +00:00
Shaun Jackman
a30b69c318 Dockerfile.test.yml: Run brew test-bot as linuxbrew
Running brew test-bot as root fails.

==> Running brew update...
Error: Running Homebrew as root is extremely dangerous and no longer supported.
2019-02-16 20:39:25 -08:00
Michka Popoff
a4f615d74f Dockerfile: do not chown linuxbrew folder
The linuxbrew user has been removed from the Dockerfile
2019-02-16 09:53:50 +01:00
Shaun Jackman
b39c5a4e84 Dockerfile: Remove environment variable USER 2019-02-15 11:18:55 -08:00
Mike McQuaid
019d97b4c8
Dockerfile: remove USER linuxbrew.
This defaults to `root` but we still want to keep a Linuxbrew user on
the system.
2019-02-15 10:05:10 +00:00