Revert "Revert "Dockerfile: use relative paths when in the /home/linuxbrew directory""

This reverts commit 6d61fb03cd0da78b41dc0d66663a6e3abf224276.
This commit is contained in:
Michka Popoff 2021-08-18 16:55:05 +02:00
parent 5ef770d6a4
commit f89b883156
No known key found for this signature in database
GPG Key ID: 033D03F151030611

View File

@ -37,15 +37,22 @@ COPY --chown=linuxbrew:linuxbrew . /home/linuxbrew/.linuxbrew/Homebrew
ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH
WORKDIR /home/linuxbrew WORKDIR /home/linuxbrew
# hadolint ignore=DL3003 RUN mkdir -p \
RUN cd /home/linuxbrew/.linuxbrew \ .linuxbrew/bin \
&& mkdir -p bin etc include lib opt sbin share var/homebrew/linked Cellar \ .linuxbrew/etc \
&& ln -s ../Homebrew/bin/brew /home/linuxbrew/.linuxbrew/bin/ \ .linuxbrew/include \
&& git -C /home/linuxbrew/.linuxbrew/Homebrew remote set-url origin https://github.com/Homebrew/brew \ .linuxbrew/lib \
&& git -C /home/linuxbrew/.linuxbrew/Homebrew fetch origin \ .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 homebrew/core \ && HOMEBREW_NO_ANALYTICS=1 HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/core \
&& brew install-bundler-gems \ && brew install-bundler-gems \
&& brew cleanup \ && brew cleanup \
&& { git -C /home/linuxbrew/.linuxbrew/Homebrew config --unset gc.auto; true; } \ && { git -C .linuxbrew/Homebrew config --unset gc.auto; true; } \
&& { git -C /home/linuxbrew/.linuxbrew/Homebrew config --unset homebrew.devcmdrun; true; } \ && { git -C .linuxbrew/Homebrew config --unset homebrew.devcmdrun; true; } \
&& rm -rf ~/.cache && rm -rf .cache