mirror of
https://github.com/Homebrew/brew.git
synced 2026-08-12 22:29:27 +04:00
Dockerfile: set HOMEBREW_* variables
This matches what `brew shellenv` prints and make shell completions work in containers (and codespaces). Evaluating `brew shellenv` does not work because `brew shellenv` detects that `PATH` is already correctly set and thus exits without printing anything. I don't think `MANPATH` and `INFOPATH` (which are also printed by `brew shellenv`) are needed in the Dockerfile because `man` and `info` are not installed in the image.
This commit is contained in:
@@ -68,6 +68,9 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
|
||||
USER linuxbrew
|
||||
ENV PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH}" \
|
||||
HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew \
|
||||
HOMEBREW_CELLAR=/home/linuxbrew/.linuxbrew/Cellar \
|
||||
HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew/Homebrew \
|
||||
XDG_CACHE_HOME=/home/linuxbrew/.cache
|
||||
WORKDIR /home/linuxbrew
|
||||
|
||||
|
||||
Reference in New Issue
Block a user