Skip to content

Commit

Permalink
add: homebrew in linux
Browse files Browse the repository at this point in the history
  • Loading branch information
ynqa committed Mar 20, 2024
1 parent 834d14d commit 1755d10
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM mcr.microsoft.com/devcontainers/rust:1-1-bullseye
# Use buster on Intel for testing Homebrew on Linux.
# https://hub.docker.com/_/microsoft-devcontainers-rust
# Please note that Homebrew on Linux does not support ARM processors.
FROM --platform=linux/x86_64 mcr.microsoft.com/devcontainers/rust:1.0.9-buster

# Clang 15
RUN apt-get update \
Expand All @@ -10,11 +13,16 @@ RUN apt-get update \
wget \
software-properties-common \
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add - \
&& apt-add-repository "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-15 main" \
&& apt-add-repository "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-15 main" \
&& apt-get update \
&& apt-get install -y clang-15 lldb-15 lld-15 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN ln -s /usr/bin/clang-15 /usr/bin/clang \
&& ln -s /usr/bin/clang++-15 /usr/bin/clang++

# Homebrew for Linux
USER vscode
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
ENV PATH=${PATH}:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/

0 comments on commit 1755d10

Please sign in to comment.