From bdff5ceb11d833466660421787a2bf9692cca79b Mon Sep 17 00:00:00 2001 From: Issy Long Date: Mon, 6 Jan 2020 01:02:23 +0000 Subject: [PATCH 01/29] CI: Use GitHub Actions instead of Travis (#62) - Travis was [broken somehow](https://travis-ci.org/Linuxbrew/docker/builds) and switching to GitHub Actions was easier than figuring out why. --- .github/workflows/dockerfilelint.yml | 10 ++++++++++ .travis.yml | 11 ----------- 2 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/dockerfilelint.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/dockerfilelint.yml b/.github/workflows/dockerfilelint.yml new file mode 100644 index 0000000..637ff96 --- /dev/null +++ b/.github/workflows/dockerfilelint.yml @@ -0,0 +1,10 @@ +name: Lint all Dockerfiles +on: pull_request +jobs: + dockerfilelint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1.1.0 + - run: npm install -g dockerfilelint + - run: dockerfilelint */Dockerfile diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 98ea171..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: nodejs -sudo: required - -services: - - docker - -before_install: - - npm install -g dockerfilelint - -script: - - dockerfilelint */Dockerfile From 51925b9ea46eec813c5301b70c5072e7f5563c76 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Mon, 6 Jan 2020 12:37:24 +0100 Subject: [PATCH 02/29] Add centos 8 (#61) * Add centos8 box --- README.md | 9 +++++++-- centos8/.dockerfilelintrc | 2 ++ centos8/Dockerfile | 20 ++++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 centos8/.dockerfilelintrc create mode 100644 centos8/Dockerfile diff --git a/README.md b/README.md index 6d2bda5..6ac25b0 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,11 @@ docker build -t linuxbrew-centos6 https://raw.githubusercontent.com/Linuxbrew/do docker build -t linuxbrew-centos7 https://raw.githubusercontent.com/Linuxbrew/docker/master/centos7/Dockerfile ``` +## CentOS 8 +```sh +docker build -t linuxbrew-centos8 https://raw.githubusercontent.com/Linuxbrew/docker/master/centos8/Dockerfile +``` + ## Debian 9 (Stretch) ```sh docker run -it linuxbrew/debian @@ -56,10 +61,10 @@ docker build -t linuxbrew-trusty https://raw.githubusercontent.com/Linuxbrew/doc ## Ubuntu 16.04 LTS (Xenial Xerus) ```sh -docker run -it linuxbrew/linuxbrew +docker build -t linuxbrew-xenial https://raw.githubusercontent.com/Linuxbrew/docker/master/xenial/Dockerfile ``` ## Ubuntu 18.04 LTS (Bionic Beaver) ```sh -docker run -it linuxbrew/linuxbrew +docker run -it linuxbrew/brew ``` diff --git a/centos8/.dockerfilelintrc b/centos8/.dockerfilelintrc new file mode 100644 index 0000000..0119a90 --- /dev/null +++ b/centos8/.dockerfilelintrc @@ -0,0 +1,2 @@ +rules: + sudo_usage: off diff --git a/centos8/Dockerfile b/centos8/Dockerfile new file mode 100644 index 0000000..7eb8438 --- /dev/null +++ b/centos8/Dockerfile @@ -0,0 +1,20 @@ +FROM centos:8 +LABEL maintainer="Shaun Jackman " +LABEL name="linuxbrew/centos8" + +RUN yum install -y curl file make ruby sudo which \ + && yum clean all + +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 + +USER linuxbrew +WORKDIR /home/linuxbrew + +ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ + SHELL=/bin/bash \ + USER=linuxbrew + +RUN yes | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)" \ + && brew config From 98b586f2b5dc3dba632867bdfd1d99b9e7975148 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Mon, 6 Jan 2020 20:01:51 +0000 Subject: [PATCH 03/29] The linuxbrew/brew Ubuntu Xenial image is now homebrew/brew (#63) * The linuxbrew/brew Ubuntu Xenial image is now homebrew/brew * Give a `docker build` command for the Ubuntu Bionic Linuxbrew image - As requested in https://github.com/Linuxbrew/docker/pull/61#discussion_r363420347. --- README.md | 7 +++++-- xenial/Dockerfile | 22 ---------------------- 2 files changed, 5 insertions(+), 24 deletions(-) delete mode 100644 xenial/Dockerfile diff --git a/README.md b/README.md index 6ac25b0..58268f6 100644 --- a/README.md +++ b/README.md @@ -60,11 +60,14 @@ docker build -t linuxbrew-trusty https://raw.githubusercontent.com/Linuxbrew/doc ``` ## Ubuntu 16.04 LTS (Xenial Xerus) + +The source for this image is in the [Homebrew/brew](https://github.com/Homebrew/brew/blob/master/Dockerfile) repository. + ```sh -docker build -t linuxbrew-xenial https://raw.githubusercontent.com/Linuxbrew/docker/master/xenial/Dockerfile +docker run -it homebrew/brew ``` ## Ubuntu 18.04 LTS (Bionic Beaver) ```sh -docker run -it linuxbrew/brew +docker build -t linuxbrew-bionic https://raw.githubusercontent.com/Linuxbrew/docker/master/bionic/Dockerfile ``` diff --git a/xenial/Dockerfile b/xenial/Dockerfile deleted file mode 100644 index 220ea3a..0000000 --- a/xenial/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM ubuntu:xenial -LABEL maintainer="Shaun Jackman " -LABEL name="linuxbrew/xenial" -ARG DEBIAN_FRONTEND=noninteractive - -RUN apt-get update \ - && apt-get install -y --no-install-recommends ca-certificates curl file g++ git locales make uuid-runtime \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* \ - && 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 - -USER linuxbrew -WORKDIR /home/linuxbrew -ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ - SHELL=/bin/bash - -RUN git clone https://github.com/Homebrew/brew /home/linuxbrew/.linuxbrew/Homebrew \ - && mkdir /home/linuxbrew/.linuxbrew/bin \ - && ln -s ../Homebrew/bin/brew /home/linuxbrew/.linuxbrew/bin/ \ - && brew config From f712eb70bb4a3aa58831b1ee5f70c91f9eedab4a Mon Sep 17 00:00:00 2001 From: VonUniGE <17067975+VonUniGE@users.noreply.github.com> Date: Wed, 8 Jan 2020 05:35:32 +0100 Subject: [PATCH 04/29] Add Debian 9 (Stretch) and Debian 10 (Buster) --- README.md | 7 ++++++- debian10/Dockerfile | 25 +++++++++++++++++++++++++ {debian => debian9}/Dockerfile | 0 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 debian10/Dockerfile rename {debian => debian9}/Dockerfile (100%) diff --git a/README.md b/README.md index 58268f6..e6def69 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,12 @@ docker build -t linuxbrew-centos8 https://raw.githubusercontent.com/Linuxbrew/do ## Debian 9 (Stretch) ```sh -docker run -it linuxbrew/debian +docker run -it linuxbrew/debian9 +``` + +## Debian 10 (Buster) +```sh +docker run -it linuxbrew/debian10 ``` ## Fedora 28 diff --git a/debian10/Dockerfile b/debian10/Dockerfile new file mode 100644 index 0000000..328c46e --- /dev/null +++ b/debian10/Dockerfile @@ -0,0 +1,25 @@ +FROM debian:buster +LABEL maintainer="Shaun Jackman " +LABEL name="linuxbrew/debian" +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update \ + && apt-get install -y --no-install-recommends ca-certificates curl file g++ git locales make uuid-runtime \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \ + && dpkg-reconfigure locales \ + && update-locale LANG=en_US.UTF-8 \ + && useradd -m -s /bin/bash linuxbrew \ + && echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers + +USER linuxbrew +WORKDIR /home/linuxbrew +ENV LANG=en_US.UTF-8 \ + PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ + SHELL=/bin/bash + +RUN git clone https://github.com/Homebrew/brew /home/linuxbrew/.linuxbrew/Homebrew \ + && mkdir /home/linuxbrew/.linuxbrew/bin \ + && ln -s ../Homebrew/bin/brew /home/linuxbrew/.linuxbrew/bin/ \ + && brew config diff --git a/debian/Dockerfile b/debian9/Dockerfile similarity index 100% rename from debian/Dockerfile rename to debian9/Dockerfile From fe7db64b185ef7ef87e7d9d3b31042f06dc780a5 Mon Sep 17 00:00:00 2001 From: VonUniGE <17067975+VonUniGE@users.noreply.github.com> Date: Mon, 13 Apr 2020 20:47:07 +0200 Subject: [PATCH 05/29] centos8: install missing packages (#70) Co-authored-by: VonUniGE --- centos8/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centos8/Dockerfile b/centos8/Dockerfile index 7eb8438..87528a8 100644 --- a/centos8/Dockerfile +++ b/centos8/Dockerfile @@ -2,7 +2,7 @@ FROM centos:8 LABEL maintainer="Shaun Jackman " LABEL name="linuxbrew/centos8" -RUN yum install -y curl file make ruby sudo which \ +RUN yum install -y curl file git glibc-langpack-en glibc-locale-source make ruby sudo which \ && yum clean all RUN localedef -i en_US -f UTF-8 en_US.UTF-8 \ From c172f691834dbd06ced2f23ad27fad1623f76543 Mon Sep 17 00:00:00 2001 From: VonUniGE <17067975+VonUniGE@users.noreply.github.com> Date: Wed, 15 Apr 2020 01:55:27 +0200 Subject: [PATCH 06/29] Add missing git package to centos images (#71) Co-authored-by: VonUniGE --- centos5/Dockerfile | 2 +- centos6/Dockerfile | 2 +- centos7/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/centos5/Dockerfile b/centos5/Dockerfile index 9f9312d..a4bdeae 100644 --- a/centos5/Dockerfile +++ b/centos5/Dockerfile @@ -5,7 +5,7 @@ LABEL name="linuxbrew/centos5" # Fix yum. CentOS 5 is end-of-life as of 2017-03-31. RUN urlgrabber https://gist.github.com/sjackman/132b65c33b62a89c45671e9c605025bc/raw/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo \ && urlgrabber https://gist.github.com/sjackman/132b65c33b62a89c45671e9c605025bc/raw/libselinux.repo /etc/yum.repos.d/libselinux.repo \ - && yum install -y curl gcc gcc44 gcc44-c++ make sudo which \ + && yum install -y curl gcc gcc44 gcc44-c++ git make sudo which \ && yum clean all RUN localedef -i en_US -f UTF-8 en_US.UTF-8 \ diff --git a/centos6/Dockerfile b/centos6/Dockerfile index 232f35f..74f7f2e 100644 --- a/centos6/Dockerfile +++ b/centos6/Dockerfile @@ -2,7 +2,7 @@ FROM centos:6 LABEL maintainer="Shaun Jackman " LABEL name="linuxbrew/centos6" -RUN yum install -y curl make sudo which \ +RUN yum install -y curl git make sudo which \ && yum clean all RUN localedef -i en_US -f UTF-8 en_US.UTF-8 \ diff --git a/centos7/Dockerfile b/centos7/Dockerfile index cc96273..00a2e29 100644 --- a/centos7/Dockerfile +++ b/centos7/Dockerfile @@ -2,7 +2,7 @@ FROM centos:7 LABEL maintainer="Shaun Jackman " LABEL name="linuxbrew/centos7" -RUN yum install -y curl file make ruby sudo which \ +RUN yum install -y curl file git make ruby sudo which \ && yum clean all RUN localedef -i en_US -f UTF-8 en_US.UTF-8 \ From 24fc008743909206e3d617106f28bdb80537bfc9 Mon Sep 17 00:00:00 2001 From: VonUniGE <17067975+VonUniGE@users.noreply.github.com> Date: Tue, 21 Apr 2020 18:42:49 +0200 Subject: [PATCH 07/29] alpine: Use shell installer (#72) Co-authored-by: VonUniGE --- alpine/Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/alpine/Dockerfile b/alpine/Dockerfile index f7da5a8..f8e9f7e 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -1,11 +1,12 @@ -FROM alpine:20190925 +FROM alpine:3.11 LABEL maintainer="Shaun Jackman " LABEL name="linuxbrew/alpine" RUN apk update \ - && apk --no-cache add bash curl file g++ git libc6-compat make ruby ruby-bigdecimal ruby-etc ruby-irb ruby-json ruby-test-unit sudo \ + && apk --no-cache add bash coreutils curl file g++ grep git libc6-compat make ruby ruby-bigdecimal ruby-etc ruby-irb ruby-json ruby-test-unit sudo \ && adduser -D -s /bin/bash linuxbrew \ - && echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers + && echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers \ + && ln -s /bin/touch /usr/bin/touch USER linuxbrew WORKDIR /home/linuxbrew @@ -13,7 +14,7 @@ ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ SHELL=/bin/bash \ USER=linuxbrew -RUN ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)" \ +RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" && HOMEBREW_NO_ANALYTICS=1 brew install -s patchelf \ && HOMEBREW_NO_ANALYTICS=1 brew install --ignore-dependencies binutils gmp isl@0.18 libmpc linux-headers mpfr zlib \ && (HOMEBREW_NO_ANALYTICS=1 brew install --ignore-dependencies gcc || true) \ From 4c5b48970209ed4772520c5032fe753c9bdbb691 Mon Sep 17 00:00:00 2001 From: Maxim Belkin Date: Thu, 23 Apr 2020 12:32:36 -0500 Subject: [PATCH 08/29] Bionic: remove redundant `apt-get clean` step (#73) From https://docs.docker.com/develop/develop-images/dockerfile_best-practices: > Official Debian and Ubuntu images automatically run apt-get clean, so explicit invocation is not required. --- bionic/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/bionic/Dockerfile b/bionic/Dockerfile index 421ccb4..f078e93 100644 --- a/bionic/Dockerfile +++ b/bionic/Dockerfile @@ -5,7 +5,6 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y --no-install-recommends ca-certificates curl file g++ git locales make uuid-runtime \ - && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && localedef -i en_US -f UTF-8 en_US.UTF-8 \ && useradd -m -s /bin/bash linuxbrew \ From 27ab0180293aeb12232a3eb64e0c65a3fcca50ec Mon Sep 17 00:00:00 2001 From: Issy Long Date: Fri, 24 Apr 2020 00:19:21 +0100 Subject: [PATCH 09/29] alpine: Reinstate a line continuation to silence `dockerfilelint` (#74) - I'm surprised this worked to build (I didn't test it), I just saw the `dockerfilelint` error: ``` File: alpine/Dockerfile Issues: 1 Line 18: && HOMEBREW_NO_ANALYTICS=1 brew install -s patchelf \ Issue Category Title Description 1 Possible Bug Invalid Command Only valid commands are allowed in a Dockerfile. ``` --- alpine/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alpine/Dockerfile b/alpine/Dockerfile index f8e9f7e..7c4c705 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -14,7 +14,7 @@ ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ SHELL=/bin/bash \ USER=linuxbrew -RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \ && HOMEBREW_NO_ANALYTICS=1 brew install -s patchelf \ && HOMEBREW_NO_ANALYTICS=1 brew install --ignore-dependencies binutils gmp isl@0.18 libmpc linux-headers mpfr zlib \ && (HOMEBREW_NO_ANALYTICS=1 brew install --ignore-dependencies gcc || true) \ From 2bf14aad84d5ef08e99e161003bebe94ee93a900 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 25 Apr 2020 12:38:57 +0100 Subject: [PATCH 10/29] centos5: delete (#77) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - This doesn't buld from master any more due to not being able to pull from GitHub due to unsupported TLS version. Also: Python 2.4?! ``` issyl0 at ophiuchus in ~/repos/homebrew/docker/centos5 on master ➜ docker build . Sending build context to Docker daemon 4.096kB Step 1/9 : FROM centos:5 ---> 1ae98b2c895d Step 2/9 : LABEL maintainer="Shaun Jackman " ---> Using cache ---> 2d03474012e9 Step 3/9 : LABEL name="linuxbrew/centos5" ---> Using cache ---> 3de0eff574b6 Step 4/9 : RUN urlgrabber https://gist.github.com/sjackman/132b65c33b62a89c45671e9c605025bc/raw/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo && urlgrabber https://gist.github.com/sjackman/132b65c33b62a89c45671e9c605025bc/raw/libselinux.repo /etc/yum.repos.d/libselinux.repo && yum install -y curl gcc gcc44 gcc44-c++ git make sudo which && yum clean all ---> Running in fb086cba2844 Traceback (most recent call last): File "/usr/bin/urlgrabber", line 124, in ? main() File "/usr/bin/urlgrabber", line 120, in main filename = urlgrab(url,filename=file,**kwargs) File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 602, in urlgrab return default_grabber.urlgrab(url, filename, **kwargs) File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 936, in urlgrab return self._retry(opts, retryfunc, url, filename) File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 854, in _retry r = apply(func, (opts,) + args, {}) File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 922, in retryfunc fo = URLGrabberFileObject(url, filename, opts) File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1010, in __init__ self._do_open() File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1093, in _do_open fo, hdr = self._make_request(req, opener) File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1206, in _make_request fo = opener.open(req) File "/usr/lib64/python2.4/urllib2.py", line 358, in open response = self._open(req, data) File "/usr/lib64/python2.4/urllib2.py", line 376, in _open '_open', req) File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain result = func(*args) File "/usr/lib64/python2.4/site-packages/M2Crypto/m2urllib2.py", line 82, in https_open h.request(req.get_method(), req.get_selector(), req.data, headers) File "/usr/lib64/python2.4/httplib.py", line 810, in request self._send_request(method, url, body, headers) File "/usr/lib64/python2.4/httplib.py", line 833, in _send_request self.endheaders() File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders self._send_output() File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output self.send(msg) File "/usr/lib64/python2.4/httplib.py", line 652, in send self.connect() File "/usr/lib64/python2.4/site-packages/M2Crypto/httpslib.py", line 55, in connect sock.connect((self.host, self.port)) File "/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Connection.py", line 174, in connect ret = self.connect_ssl() File "/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Connection.py", line 167, in connect_ssl return m2.ssl_connect(self.ssl, self._timeout) M2Crypto.SSL.SSLError: tlsv1 alert protocol version The command '/bin/sh -c urlgrabber https://gist.github.com/sjackman/132b65c33b62a89c45671e9c605025bc/raw/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo && urlgrabber https://gist.github.com/sjackman/132b65c33b62a89c45671e9c605025bc/raw/libselinux.repo /etc/yum.repos.d/libselinux.repo && yum install -y curl gcc gcc44 gcc44-c++ git make sudo which && yum clean all' returned a non-zero code: 1 ``` --- centos5/.dockerfilelintrc | 2 -- centos5/Dockerfile | 29 ----------------------------- 2 files changed, 31 deletions(-) delete mode 100644 centos5/.dockerfilelintrc delete mode 100644 centos5/Dockerfile diff --git a/centos5/.dockerfilelintrc b/centos5/.dockerfilelintrc deleted file mode 100644 index 0119a90..0000000 --- a/centos5/.dockerfilelintrc +++ /dev/null @@ -1,2 +0,0 @@ -rules: - sudo_usage: off diff --git a/centos5/Dockerfile b/centos5/Dockerfile deleted file mode 100644 index a4bdeae..0000000 --- a/centos5/Dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -FROM centos:5 -LABEL maintainer="Shaun Jackman " -LABEL name="linuxbrew/centos5" - -# Fix yum. CentOS 5 is end-of-life as of 2017-03-31. -RUN urlgrabber https://gist.github.com/sjackman/132b65c33b62a89c45671e9c605025bc/raw/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo \ - && urlgrabber https://gist.github.com/sjackman/132b65c33b62a89c45671e9c605025bc/raw/libselinux.repo /etc/yum.repos.d/libselinux.repo \ - && yum install -y curl gcc gcc44 gcc44-c++ git make sudo which \ - && yum clean all - -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 - -USER linuxbrew -WORKDIR /home/linuxbrew - -ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ - SHELL=/bin/bash \ - USER=linuxbrew - -# Install Linuxbrew. -# Create symlinks for GCC 4.4. -# Install a recent version of file that supports --print0. -RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" \ - && ln -s /usr/bin/gcc44 ~/.linuxbrew/bin/gcc-4.4 \ - && ln -s /usr/bin/g++44 ~/.linuxbrew/bin/g++-4.4 \ - && HOMEBREW_BUILD_FROM_SOURCE=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install file-formula \ - && brew config From 5e08c5a4120a9eb86f34449e0f6af8218df9c817 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Thu, 23 Apr 2020 23:52:53 +0100 Subject: [PATCH 11/29] Switch Dockerfiles to install using Homebrew/install - The Linuxbrew/install repo is deprecated. --- centos6/Dockerfile | 2 +- centos7/Dockerfile | 2 +- centos8/Dockerfile | 2 +- opensuse/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/centos6/Dockerfile b/centos6/Dockerfile index 74f7f2e..9d922d2 100644 --- a/centos6/Dockerfile +++ b/centos6/Dockerfile @@ -16,5 +16,5 @@ ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ SHELL=/bin/bash \ USER=linuxbrew -RUN yes | sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" \ +RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \ && brew config diff --git a/centos7/Dockerfile b/centos7/Dockerfile index 00a2e29..bb78ed6 100644 --- a/centos7/Dockerfile +++ b/centos7/Dockerfile @@ -16,5 +16,5 @@ ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ SHELL=/bin/bash \ USER=linuxbrew -RUN yes | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)" \ +RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \ && brew config diff --git a/centos8/Dockerfile b/centos8/Dockerfile index 87528a8..e493580 100644 --- a/centos8/Dockerfile +++ b/centos8/Dockerfile @@ -16,5 +16,5 @@ ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ SHELL=/bin/bash \ USER=linuxbrew -RUN yes | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)" \ +RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \ && brew config diff --git a/opensuse/Dockerfile b/opensuse/Dockerfile index e4136a2..da98dd6 100644 --- a/opensuse/Dockerfile +++ b/opensuse/Dockerfile @@ -13,7 +13,7 @@ ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ SHELL=/bin/bash \ USER=linuxbrew -RUN yes | sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" \ +RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \ && brew config CMD ["/bin/bash"] From 29ef20aa7e3d2a99a9fe115117e6b9b883bbdbf0 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 25 Apr 2020 12:05:01 +0100 Subject: [PATCH 12/29] opensuse: Use a FROM line that works and is the latest release - The original of this failed to build because the `opensuse:leap` images don't exist, in favour of `opensuse/leap`. While Leap still exists, Tumbleweed is the latest release, so I've bumped that too. --- opensuse/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensuse/Dockerfile b/opensuse/Dockerfile index da98dd6..42a19c6 100644 --- a/opensuse/Dockerfile +++ b/opensuse/Dockerfile @@ -1,4 +1,4 @@ -FROM opensuse:leap +FROM opensuse/tumbleweed:latest LABEL maintainer="Shaun Jackman " LABEL name="linuxbrew/opensuse" From c3cba7a401813dabeb76249771e55e6d5cb5fd82 Mon Sep 17 00:00:00 2001 From: VonUniGE <17067975+VonUniGE@users.noreply.github.com> Date: Sat, 25 Apr 2020 18:32:14 +0200 Subject: [PATCH 13/29] fedora: Use install script from Homebrew (#76) Update README.md with the current version of Fedora. Co-authored-by: VonUniGE --- README.md | 2 +- fedora/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e6def69..11b4f75 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ docker run -it linuxbrew/debian9 docker run -it linuxbrew/debian10 ``` -## Fedora 28 +## Fedora 31 ```sh docker build -t linuxbrew-fedora https://raw.githubusercontent.com/Linuxbrew/docker/master/fedora/Dockerfile ``` diff --git a/fedora/Dockerfile b/fedora/Dockerfile index 3f79685..8f629f7 100644 --- a/fedora/Dockerfile +++ b/fedora/Dockerfile @@ -1,4 +1,4 @@ -FROM fedora:28 +FROM fedora:31 LABEL maintainer="Shaun Jackman " LABEL name="linuxbrew/fedora" @@ -14,7 +14,7 @@ ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ SHELL=/bin/bash \ USER=linuxbrew -RUN yes | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)" \ +RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \ && brew config CMD ["/bin/bash"] From 95546c4b4c1af361abb07eafcc8aa4683d76e20e Mon Sep 17 00:00:00 2001 From: Issy Long Date: Fri, 24 Apr 2020 18:19:46 +0100 Subject: [PATCH 14/29] Lint Dockerfiles with `hadolint`, not `dockerfilelint` - Dockerfilelint doesn't seem maintained (no releases since early last year) and its documented approach for ignoring linting issues doesn't seem to work. - I'm in the mood to do this now, not when GitHub make Homebrew available again in the Ubuntu Actions images. So I've switched CI to run on macOS until such time as GitHub release a new `ubuntu-latest` iamge. It feels a bit weird, but why not seize the enthusiasm! --- .github/workflows/default.yml | 9 +++++++++ .github/workflows/dockerfilelint.yml | 10 ---------- 2 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/default.yml delete mode 100644 .github/workflows/dockerfilelint.yml diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml new file mode 100644 index 0000000..e7f094c --- /dev/null +++ b/.github/workflows/default.yml @@ -0,0 +1,9 @@ +name: Lint all Dockerfiles +on: [push, pull_request] +jobs: + lint: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - run: brew install hadolint + - run: hadolint */Dockerfile diff --git a/.github/workflows/dockerfilelint.yml b/.github/workflows/dockerfilelint.yml deleted file mode 100644 index 637ff96..0000000 --- a/.github/workflows/dockerfilelint.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: Lint all Dockerfiles -on: pull_request -jobs: - dockerfilelint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1.1.0 - - run: npm install -g dockerfilelint - - run: dockerfilelint */Dockerfile From 53343f9cdc121b93cf20d618ab4bb2bb9107ce88 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Fri, 24 Apr 2020 18:30:18 +0100 Subject: [PATCH 15/29] scratch-onestage: Fix lint error DL3020 by changing ADD to COPY ``` scratch-onestage/Dockerfile:7 DL3020 Use COPY instead of ADD for files and folders ``` --- scratch-onestage/Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scratch-onestage/Dockerfile b/scratch-onestage/Dockerfile index 735bf3b..50f3d18 100644 --- a/scratch-onestage/Dockerfile +++ b/scratch-onestage/Dockerfile @@ -4,13 +4,13 @@ LABEL name="linuxbrew/scratch-onestage" ENV HOME=/home/linuxbrew LD_LIBRARY_PATH=/lib PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/bin -ADD linuxbrew $HOME/.linuxbrew -ADD cache $HOME/.cache/Homebrew -ADD etc/passwd etc/ -ADD bin /bin/ -ADD lib /lib/ -ADD lib64 /lib64/ -ADD usr /usr/ +COPY linuxbrew $HOME/.linuxbrew +COPY cache $HOME/.cache/Homebrew +COPY etc/passwd etc/ +COPY bin /bin/ +COPY lib /lib/ +COPY lib64 /lib64/ +COPY usr /usr/ ADD cache/portable-ruby-2.0.0-p648.x86_64_linux.bottle.tar.gz $HOME/.linuxbrew/Homebrew/Library/Homebrew/vendor/ RUN mkdir -m777 /var && mkdir -m1777 /tmp /var/tmp && chown -R 1000:1000 /bin /etc /lib /lib64 /home /usr /var From 7282c1d1f78db25254045e53d93f87b16bc46c9d Mon Sep 17 00:00:00 2001 From: Issy Long Date: Fri, 24 Apr 2020 18:31:29 +0100 Subject: [PATCH 16/29] scratch-onestage: Ignore lint SC2114 - we delete system dirs often! --- scratch-onestage/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/scratch-onestage/Dockerfile b/scratch-onestage/Dockerfile index 50f3d18..20ed995 100644 --- a/scratch-onestage/Dockerfile +++ b/scratch-onestage/Dockerfile @@ -24,6 +24,7 @@ RUN brew link libmagic \ && brew config USER root +# hadolint ignore=SC2114 RUN rm -rf /bin /lib && ln -s ~/.linuxbrew/bin /bin && ln -s ~/.linuxbrew/lib /lib USER linuxbrew From ba2e9328552c67c7f65f9bd086ff88caf555dcbd Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 25 Apr 2020 12:52:12 +0100 Subject: [PATCH 17/29] opensuse, travis: Ignore linting error DL3007 - [DL3007](https://github.com/hadolint/hadolint/wiki/DL3007) states that images should not pull from `latest` tags. But `latest` tags are [all](https://hub.docker.com/r/opensuse/tumbleweed/tags) these images [have](https://quay.io/repository/travisci/travis-ruby?tab=tags). --- opensuse/Dockerfile | 1 + travis/Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/opensuse/Dockerfile b/opensuse/Dockerfile index 42a19c6..949440a 100644 --- a/opensuse/Dockerfile +++ b/opensuse/Dockerfile @@ -1,3 +1,4 @@ +# hadolint ignore=DL3007 FROM opensuse/tumbleweed:latest LABEL maintainer="Shaun Jackman " LABEL name="linuxbrew/opensuse" diff --git a/travis/Dockerfile b/travis/Dockerfile index 928561c..360e880 100644 --- a/travis/Dockerfile +++ b/travis/Dockerfile @@ -1,3 +1,4 @@ +# hadolint ignore=DL3007 FROM quay.io/travisci/travis-ruby:latest LABEL maintainer="Bob W. Hogg " LABEL name="linuxbrew/travis" From efa4aef00f899e5d5af5e0ad2e16524f6ba192ed Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 25 Apr 2020 13:08:28 +0100 Subject: [PATCH 18/29] scratch: Use linuxbrew/linuxbrew:1.9.3 instead of :latest - I'm not sure how used this Dockerfile is, and it's possible that tag 1.9.3 is very old - these days people should be using `homebrew/brew`. --- scratch/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scratch/Dockerfile b/scratch/Dockerfile index 588c5a7..404a7b4 100644 --- a/scratch/Dockerfile +++ b/scratch/Dockerfile @@ -1,4 +1,4 @@ -FROM linuxbrew/linuxbrew:latest AS base +FROM linuxbrew/linuxbrew:1.9.3 AS base LABEL maintainer="Shaun Jackman " LABEL name="linuxbrew/scratch" From 48e8fad41bead15b01a10e4376d0bcc6020510bf Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 25 Apr 2020 13:30:12 +0100 Subject: [PATCH 19/29] Ignore linting rules DL3008 and DL3018 globally - [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. - [DL3018](https://github.com/hadolint/hadolint/wiki/DL3018) - pinning versions in `apk add` - is disabled for the same reasoning as above, but for Alpine images. --- .hadolint.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .hadolint.yaml diff --git a/.hadolint.yaml b/.hadolint.yaml new file mode 100644 index 0000000..502b578 --- /dev/null +++ b/.hadolint.yaml @@ -0,0 +1,3 @@ +ignored: + - DL3018 + - DL3008 From f9ff01206e5217d769022462e549dc734d5421e3 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 25 Apr 2020 13:34:53 +0100 Subject: [PATCH 20/29] travis: Fix lint errors SC2039 and SC2035 - [SC2035](https://github.com/koalaman/shellcheck/wiki/SC2035) was an easy fix. - [SC2039](https://github.com/koalaman/shellcheck/wiki/SC2039) was moaning about `ulimit -n` not being valid in POSIX `sh`. Thankfully, we can use `bash`. --- travis/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/travis/Dockerfile b/travis/Dockerfile index 360e880..5a22b6e 100644 --- a/travis/Dockerfile +++ b/travis/Dockerfile @@ -56,6 +56,7 @@ RUN useradd -ms /bin/bash linuxbrew RUN echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers USER linuxbrew WORKDIR /home/linuxbrew +SHELL /bin/bash # Install Linuxbrew RUN git clone --depth=1 https://github.com/Linuxbrew/brew .linuxbrew/Homebrew @@ -68,4 +69,4 @@ RUN umask 022 RUN brew tap linuxbrew/xorg WORKDIR /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula # Fix error: Incorrect file permissions (664) -RUN chmod 0644 *.rb +RUN chmod 0644 -- *.rb From 12e85c627c01b734ff9b3795c535dec8cda83d9d Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 25 Apr 2020 13:54:35 +0100 Subject: [PATCH 21/29] opensuse, fedora, centos*: Fix lint error DL4006 - [DL4006](https://github.com/hadolint/hadolint/wiki/DL4006) states that `-o pipefail` must be passed if using `bash` with a RUN command with pipes. --- centos6/Dockerfile | 3 ++- centos7/Dockerfile | 3 ++- centos8/Dockerfile | 3 ++- fedora/Dockerfile | 2 +- opensuse/Dockerfile | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/centos6/Dockerfile b/centos6/Dockerfile index 9d922d2..5cc0fff 100644 --- a/centos6/Dockerfile +++ b/centos6/Dockerfile @@ -13,8 +13,9 @@ USER linuxbrew WORKDIR /home/linuxbrew ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ - SHELL=/bin/bash \ USER=linuxbrew +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \ && brew config diff --git a/centos7/Dockerfile b/centos7/Dockerfile index bb78ed6..4f3e3ad 100644 --- a/centos7/Dockerfile +++ b/centos7/Dockerfile @@ -13,8 +13,9 @@ USER linuxbrew WORKDIR /home/linuxbrew ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ - SHELL=/bin/bash \ USER=linuxbrew +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \ && brew config diff --git a/centos8/Dockerfile b/centos8/Dockerfile index e493580..31ebfa7 100644 --- a/centos8/Dockerfile +++ b/centos8/Dockerfile @@ -13,8 +13,9 @@ USER linuxbrew WORKDIR /home/linuxbrew ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ - SHELL=/bin/bash \ USER=linuxbrew +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \ && brew config diff --git a/fedora/Dockerfile b/fedora/Dockerfile index 8f629f7..b8b6735 100644 --- a/fedora/Dockerfile +++ b/fedora/Dockerfile @@ -11,9 +11,9 @@ RUN dnf install -y curl file git glibc-locale-source make ruby rubygem-json ruby USER linuxbrew WORKDIR /home/linuxbrew ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ - SHELL=/bin/bash \ USER=linuxbrew +SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \ && brew config diff --git a/opensuse/Dockerfile b/opensuse/Dockerfile index 949440a..2e83b2f 100644 --- a/opensuse/Dockerfile +++ b/opensuse/Dockerfile @@ -11,9 +11,10 @@ RUN zypper --non-interactive install curl git glibc-i18ndata glibc-locale make s USER linuxbrew WORKDIR /home/linuxbrew ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ - SHELL=/bin/bash \ USER=linuxbrew +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \ && brew config From bfca5beed39b6b8a98c5f524412a08363aea60ee Mon Sep 17 00:00:00 2001 From: VonUniGE <17067975+VonUniGE@users.noreply.github.com> Date: Tue, 28 Apr 2020 00:27:48 +0200 Subject: [PATCH 22/29] Add Ubuntu 20.04 LTS (Focal Fossa) (#80) Co-authored-by: VonUniGE --- README.md | 5 +++++ focal/Dockerfile | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 focal/Dockerfile diff --git a/README.md b/README.md index 11b4f75..6d158a2 100644 --- a/README.md +++ b/README.md @@ -76,3 +76,8 @@ docker run -it homebrew/brew ```sh docker build -t linuxbrew-bionic https://raw.githubusercontent.com/Linuxbrew/docker/master/bionic/Dockerfile ``` + +## Ubuntu 20.04 LTS (Focal Fossa) +```sh +docker build -t linuxbrew-focal https://raw.githubusercontent.com/Linuxbrew/docker/master/focal/Dockerfile +``` diff --git a/focal/Dockerfile b/focal/Dockerfile new file mode 100644 index 0000000..d61ab60 --- /dev/null +++ b/focal/Dockerfile @@ -0,0 +1,18 @@ +FROM ubuntu:focal +LABEL maintainer="Shaun Jackman " +LABEL name="linuxbrew/focal" +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update \ + && apt-get install -y --no-install-recommends ca-certificates curl file g++ git locales make uuid-runtime \ + && rm -rf /var/lib/apt/lists/* \ + && 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 + +USER linuxbrew +WORKDIR /home/linuxbrew +ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ + SHELL=/bin/bash + +RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" From bfb85f5cd62011c2674f6a9f3525a9c060eb95d5 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Mon, 4 May 2020 00:15:08 +0100 Subject: [PATCH 23/29] README: Delete CentOS 5 instructions - The CentOS 5 Dockerfile was removed in 2bf14aad84d5ef08e99e161003bebe94ee93a900. --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 6d158a2..54a346a 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,6 @@ Dockerfiles for using Linuxbrew on various distributions of Linux. docker run -it linuxbrew/alpine ``` -## CentOS 5 -```sh -docker build -t linuxbrew-centos5 https://raw.githubusercontent.com/Linuxbrew/docker/master/centos5/Dockerfile -``` - ## CentOS 6 ```sh docker build -t linuxbrew-centos6 https://raw.githubusercontent.com/Linuxbrew/docker/master/centos6/Dockerfile From 5896d03229b942ca775df35e689e8d2a3250a078 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Fri, 15 May 2020 20:05:38 +0100 Subject: [PATCH 24/29] ci: Run on Linux, not macOS, as the Actions Linux runners have Homebrew (#81) - It always felt odd to be running the checks on macOS for a repo in the _Linuxbrew_ org. --- .github/workflows/default.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index e7f094c..4dea7d3 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -2,7 +2,7 @@ name: Lint all Dockerfiles on: [push, pull_request] jobs: lint: - runs-on: macos-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: brew install hadolint From 41ec1f301d65a6919237f6aef50a0859fd28fff9 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Fri, 22 May 2020 11:02:37 -0700 Subject: [PATCH 25/29] Remove Ubuntu 18 and 20, use images on Docker Hub (#82) --- README.md | 16 +++++++++++----- bionic/Dockerfile | 21 --------------------- focal/Dockerfile | 18 ------------------ 3 files changed, 11 insertions(+), 44 deletions(-) delete mode 100644 bionic/Dockerfile delete mode 100644 focal/Dockerfile diff --git a/README.md b/README.md index 54a346a..3796024 100644 --- a/README.md +++ b/README.md @@ -61,18 +61,24 @@ docker build -t linuxbrew-trusty https://raw.githubusercontent.com/Linuxbrew/doc ## Ubuntu 16.04 LTS (Xenial Xerus) -The source for this image is in the [Homebrew/brew](https://github.com/Homebrew/brew/blob/master/Dockerfile) repository. - ```sh -docker run -it homebrew/brew +docker run -it homebrew/ubuntu16.04 ``` +[Dockerfile](https://github.com/Homebrew/brew/blob/master/Dockerfile) + ## Ubuntu 18.04 LTS (Bionic Beaver) + ```sh -docker build -t linuxbrew-bionic https://raw.githubusercontent.com/Linuxbrew/docker/master/bionic/Dockerfile +docker run -it homebrew/ubuntu18.04 ``` +[Dockerfile](https://github.com/Homebrew/brew/blob/master/Dockerfile) + ## Ubuntu 20.04 LTS (Focal Fossa) + ```sh -docker build -t linuxbrew-focal https://raw.githubusercontent.com/Linuxbrew/docker/master/focal/Dockerfile +docker run -it homebrew/ubuntu20.04 ``` + +[Dockerfile](https://github.com/Homebrew/brew/blob/master/Dockerfile) diff --git a/bionic/Dockerfile b/bionic/Dockerfile deleted file mode 100644 index f078e93..0000000 --- a/bionic/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM ubuntu:bionic -LABEL maintainer="Shaun Jackman " -LABEL name="linuxbrew/bionic" -ARG DEBIAN_FRONTEND=noninteractive - -RUN apt-get update \ - && apt-get install -y --no-install-recommends ca-certificates curl file g++ git locales make uuid-runtime \ - && rm -rf /var/lib/apt/lists/* \ - && 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 - -USER linuxbrew -WORKDIR /home/linuxbrew -ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ - SHELL=/bin/bash - -RUN git clone https://github.com/Homebrew/brew /home/linuxbrew/.linuxbrew/Homebrew \ - && mkdir /home/linuxbrew/.linuxbrew/bin \ - && ln -s ../Homebrew/bin/brew /home/linuxbrew/.linuxbrew/bin/ \ - && brew config diff --git a/focal/Dockerfile b/focal/Dockerfile deleted file mode 100644 index d61ab60..0000000 --- a/focal/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM ubuntu:focal -LABEL maintainer="Shaun Jackman " -LABEL name="linuxbrew/focal" -ARG DEBIAN_FRONTEND=noninteractive - -RUN apt-get update \ - && apt-get install -y --no-install-recommends ca-certificates curl file g++ git locales make uuid-runtime \ - && rm -rf /var/lib/apt/lists/* \ - && 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 - -USER linuxbrew -WORKDIR /home/linuxbrew -ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ - SHELL=/bin/bash - -RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" From 8c5be00138e1e52307ea93790d2d199fc996ce8a Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Wed, 5 Aug 2020 14:13:52 -0700 Subject: [PATCH 26/29] Add debian8/Dockerfile (#84) --- README.md | 5 +++++ debian8/Dockerfile | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 debian8/Dockerfile diff --git a/README.md b/README.md index 3796024..032b609 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,11 @@ docker build -t linuxbrew-centos7 https://raw.githubusercontent.com/Linuxbrew/do docker build -t linuxbrew-centos8 https://raw.githubusercontent.com/Linuxbrew/docker/master/centos8/Dockerfile ``` +## Debian 8 (Jessie) +```sh +docker build -t linuxbrew-debian8 https://raw.githubusercontent.com/Linuxbrew/docker/master/debian8/Dockerfile +``` + ## Debian 9 (Stretch) ```sh docker run -it linuxbrew/debian9 diff --git a/debian8/Dockerfile b/debian8/Dockerfile new file mode 100644 index 0000000..d9c0edc --- /dev/null +++ b/debian8/Dockerfile @@ -0,0 +1,23 @@ +FROM debian:jessie +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update \ + && apt-get install -y --no-install-recommends ca-certificates curl file g++ git locales make uuid-runtime \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \ + && dpkg-reconfigure locales \ + && update-locale LANG=en_US.UTF-8 \ + && useradd -m -s /bin/bash linuxbrew \ + && echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers + +USER linuxbrew +WORKDIR /home/linuxbrew +ENV LANG=en_US.UTF-8 \ + PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \ + SHELL=/bin/bash + +RUN git clone https://github.com/Homebrew/brew /home/linuxbrew/.linuxbrew/Homebrew \ + && mkdir /home/linuxbrew/.linuxbrew/bin \ + && ln -s ../Homebrew/bin/brew /home/linuxbrew/.linuxbrew/bin/ \ + && brew config From 9098e8b1e0d33cb3d7cd427b8074c9e06d6c8647 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Thu, 6 Aug 2020 15:48:14 -0700 Subject: [PATCH 27/29] Add debian7 (#85) See http://hub.docker.com/r/homebrew/debian7 --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 032b609..3c6597e 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,11 @@ docker build -t linuxbrew-centos7 https://raw.githubusercontent.com/Linuxbrew/do docker build -t linuxbrew-centos8 https://raw.githubusercontent.com/Linuxbrew/docker/master/centos8/Dockerfile ``` +## Debian 7 (Wheezy) +```sh +docker run -it homebrew/debian7 +``` + ## Debian 8 (Jessie) ```sh docker build -t linuxbrew-debian8 https://raw.githubusercontent.com/Linuxbrew/docker/master/debian8/Dockerfile From 41a89bc1d93f31061ee1a93853825c01efe85ec1 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Thu, 6 Aug 2020 15:50:48 -0700 Subject: [PATCH 28/29] debian7: Add a link to the Dockerfile --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3c6597e..8d24b6d 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ docker build -t linuxbrew-centos8 https://raw.githubusercontent.com/Linuxbrew/do docker run -it homebrew/debian7 ``` +[Dockerfile](https://github.com/Homebrew/homebrew-linux-dev/blob/master/Dockerfile) + ## Debian 8 (Jessie) ```sh docker build -t linuxbrew-debian8 https://raw.githubusercontent.com/Linuxbrew/docker/master/debian8/Dockerfile From 2c7ecfeca6271830dce8198a6b6df4e3d46ee687 Mon Sep 17 00:00:00 2001 From: Maxim Belkin Date: Mon, 10 Aug 2020 21:18:30 -0500 Subject: [PATCH 29/29] alpine: add ruby-fiddle (#86) Solves: ``` /usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- fiddle (LoadError) from /usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' ``` --- alpine/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 7c4c705..624cd09 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -3,7 +3,7 @@ LABEL maintainer="Shaun Jackman " LABEL name="linuxbrew/alpine" RUN apk update \ - && apk --no-cache add bash coreutils curl file g++ grep git libc6-compat make ruby ruby-bigdecimal ruby-etc ruby-irb ruby-json ruby-test-unit sudo \ + && apk --no-cache add bash coreutils curl file g++ grep git libc6-compat make ruby ruby-bigdecimal ruby-etc ruby-fiddle ruby-irb ruby-json ruby-test-unit sudo \ && adduser -D -s /bin/bash linuxbrew \ && echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers \ && ln -s /bin/touch /usr/bin/touch