9 Star 36 Fork 0

Gitee 极速下载 / homebrew

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/homebrew/brew
克隆/下载
Dockerfile 2.90 KB
一键复制 编辑 原始数据 按行查看 历史
Bo Anderson 提交于 2024-02-19 18:39 . Dockerfile: drop libz-dev
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
# /etc/lsb-release is checked inside the container and sets DISTRIB_RELEASE.
# We need `[` instead of `[[` because the shell is `/bin/sh`.
# shellcheck disable=SC1091,SC2154,SC2292
RUN apt-get update \
&& apt-get install -y --no-install-recommends software-properties-common gnupg-agent \
&& add-apt-repository -y ppa:git-core/ppa \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
acl \
bzip2 \
ca-certificates \
curl \
file \
fonts-dejavu-core \
g++ \
gawk \
git \
gpg \
less \
locales \
make \
netbase \
openssh-client \
patch \
sudo \
unzip \
uuid-runtime \
tzdata \
jq \
&& if [ "$(. /etc/lsb-release; echo "${DISTRIB_RELEASE}" | cut -d. -f1)" -ge 22 ]; then apt-get install -y --no-install-recommends skopeo; fi \
&& curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt-get update \
&& apt-get install -y --no-install-recommends gh \
&& apt-get remove --purge -y software-properties-common \
&& apt-get autoremove --purge -y \
&& rm -rf /var/lib/apt/lists/* \
&& sed -i -E 's/^(USERGROUPS_ENAB\s+)yes$/\1no/' /etc/login.defs \
&& localedef -i en_US -f UTF-8 en_US.UTF-8 \
&& useradd --create-home --shell /bin/bash --user-group linuxbrew \
&& echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers \
&& su - linuxbrew -c 'mkdir ~/.linuxbrew'
USER linuxbrew
COPY --chown=linuxbrew:linuxbrew . /home/linuxbrew/.linuxbrew/Homebrew
ENV PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH}" \
XDG_CACHE_HOME=/home/linuxbrew/.cache
WORKDIR /home/linuxbrew
RUN mkdir -p \
.linuxbrew/bin \
.linuxbrew/etc \
.linuxbrew/include \
.linuxbrew/lib \
.linuxbrew/opt \
.linuxbrew/sbin \
.linuxbrew/share \
.linuxbrew/var/homebrew/linked \
.linuxbrew/Cellar \
&& 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 fetch origin \
&& HOMEBREW_NO_ANALYTICS=1 HOMEBREW_NO_AUTO_UPDATE=1 brew tap --force homebrew/core \
&& brew install-bundler-gems --groups=all \
&& brew cleanup \
&& { git -C .linuxbrew/Homebrew config --unset gc.auto; true; } \
&& { git -C .linuxbrew/Homebrew config --unset homebrew.devcmdrun; true; } \
&& rm -rf .cache \
&& touch .linuxbrew/.homebrewdocker
Ruby
1
https://gitee.com/mirrors/homebrew.git
git@gitee.com:mirrors/homebrew.git
mirrors
homebrew
homebrew
master

搜索帮助