mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Dockerfile: cleanup style, add comments.
This commit is contained in:
parent
917a1e7bff
commit
08644386e1
67
Dockerfile
67
Dockerfile
@ -1,36 +1,41 @@
|
|||||||
ARG version=22.04
|
ARG version=22.04
|
||||||
|
# version is passed through by Docker.
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
FROM ubuntu:"${version}"
|
FROM ubuntu:"${version}"
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# We don't want to manually pin versions, happy to use whatever
|
||||||
|
# Ubuntu thinks is best.
|
||||||
# hadolint ignore=DL3008
|
# hadolint ignore=DL3008
|
||||||
# shellcheck disable=SC2292
|
|
||||||
|
# /etc/lsb-release is checked inside the container and sets DISTRIB_RELEASE.
|
||||||
|
# shellcheck disable=SC1091,SC2154
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends software-properties-common gnupg-agent \
|
&& apt-get install -y --no-install-recommends software-properties-common gnupg-agent \
|
||||||
&& add-apt-repository -y ppa:git-core/ppa \
|
&& add-apt-repository -y ppa:git-core/ppa \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
acl \
|
acl \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
file \
|
file \
|
||||||
fonts-dejavu-core \
|
fonts-dejavu-core \
|
||||||
g++ \
|
g++ \
|
||||||
gawk \
|
gawk \
|
||||||
git \
|
git \
|
||||||
less \
|
less \
|
||||||
libz-dev \
|
libz-dev \
|
||||||
locales \
|
locales \
|
||||||
make \
|
make \
|
||||||
netbase \
|
netbase \
|
||||||
openssh-client \
|
openssh-client \
|
||||||
patch \
|
patch \
|
||||||
sudo \
|
sudo \
|
||||||
uuid-runtime \
|
uuid-runtime \
|
||||||
tzdata \
|
tzdata \
|
||||||
jq \
|
jq \
|
||||||
&& if [ "$(. /etc/lsb-release; echo "${DISTRIB_RELEASE}" | cut -d. -f1)" -ge 18 ]; then apt-get install gpg; fi \
|
&& if [[ "$(. /etc/lsb-release; echo "${DISTRIB_RELEASE}" | cut -d. -f1)" -ge 18 ]]; then apt-get install gpg; fi \
|
||||||
&& apt-get remove --purge -y software-properties-common \
|
&& apt-get remove --purge -y software-properties-common \
|
||||||
&& apt-get autoremove --purge -y \
|
&& apt-get autoremove --purge -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
@ -45,15 +50,15 @@ ENV PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH}
|
|||||||
WORKDIR /home/linuxbrew
|
WORKDIR /home/linuxbrew
|
||||||
|
|
||||||
RUN mkdir -p \
|
RUN mkdir -p \
|
||||||
.linuxbrew/bin \
|
.linuxbrew/bin \
|
||||||
.linuxbrew/etc \
|
.linuxbrew/etc \
|
||||||
.linuxbrew/include \
|
.linuxbrew/include \
|
||||||
.linuxbrew/lib \
|
.linuxbrew/lib \
|
||||||
.linuxbrew/opt \
|
.linuxbrew/opt \
|
||||||
.linuxbrew/sbin \
|
.linuxbrew/sbin \
|
||||||
.linuxbrew/share \
|
.linuxbrew/share \
|
||||||
.linuxbrew/var/homebrew/linked \
|
.linuxbrew/var/homebrew/linked \
|
||||||
.linuxbrew/Cellar \
|
.linuxbrew/Cellar \
|
||||||
&& ln -s ../Homebrew/bin/brew .linuxbrew/bin/brew \
|
&& ln -s ../Homebrew/bin/brew .linuxbrew/bin/brew \
|
||||||
&& git -C .linuxbrew/Homebrew remote set-url origin https://github.com/Homebrew/brew \
|
&& git -C .linuxbrew/Homebrew remote set-url origin https://github.com/Homebrew/brew \
|
||||||
&& git -C .linuxbrew/Homebrew fetch origin \
|
&& git -C .linuxbrew/Homebrew fetch origin \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user