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
@ -1,10 +1,15 @@
|
||||
ARG version=22.04
|
||||
# version is passed through by Docker.
|
||||
# shellcheck disable=SC2154
|
||||
FROM ubuntu:"${version}"
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# We don't want to manually pin versions, happy to use whatever
|
||||
# Ubuntu thinks is best.
|
||||
# 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 \
|
||||
&& apt-get install -y --no-install-recommends software-properties-common gnupg-agent \
|
||||
&& add-apt-repository -y ppa:git-core/ppa \
|
||||
@ -30,7 +35,7 @@ RUN apt-get update \
|
||||
uuid-runtime \
|
||||
tzdata \
|
||||
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 autoremove --purge -y \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
|
Loading…
x
Reference in New Issue
Block a user