Skip to content

Commit

Permalink
Merge pull request #368 from 0xcodeboi/0xcodeboi/add-toolchains-to-de…
Browse files Browse the repository at this point in the history
…v-container
  • Loading branch information
radu-matei authored Apr 17, 2022
2 parents f9ce401 + f4426a4 commit 14603bb
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
27 changes: 26 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,29 @@ FROM mcr.microsoft.com/vscode/devcontainers/rust:0-${VARIANT}
# && apt-get -y install --no-install-recommends <your-package-list-here>

ARG BINDLE_URL="https://github.com/deislabs/bindle/releases/download/v0.8.0/bindle-v0.8.0-linux-amd64.tar.gz"
RUN curl -sL "$BINDLE_URL" | tar -xzf - -C /usr/local/bin bindle bindle-server
RUN curl -sL "$BINDLE_URL" | tar -xzf - -C /usr/local/bin bindle bindle-server

# Go installation, see https://go.dev/doc/install
ARG GO_URL="https://go.dev/dl/go1.18.1.linux-amd64.tar.gz"
RUN curl -sL "$GO_URL" | tar -xzf - -C /usr/local
ENV PATH "$PATH:/usr/local/go/bin"

# TinyGo installation, see https://tinygo.org/getting-started/install/linux/ for instructions
ARG TINYGO_URL="https://github.com/tinygo-org/tinygo/releases/download/v0.22.0/tinygo_0.22.0_amd64.deb"
RUN curl -sL "$TINYGO_URL" -o tinygo_amd64.deb && dpkg -i tinygo_amd64.deb && rm tinygo_amd64.deb

# Install the gopls Go Language Server, see https://github.com/golang/tools/tree/master/gopls
RUN go install golang.org/x/tools/gopls@latest

# Install additional rust components (rust-analyzer)
ARG RUST_ANALYZER_URL="https://github.com/rust-lang/rust-analyzer/releases/download/2022-04-11/rust-analyzer-x86_64-unknown-linux-gnu.gz"
RUN curl -sL "$RUST_ANALYZER_URL" | gunzip -c - > /usr/local/bin/rust-analyzer && chmod +x /usr/local/bin/rust-analyzer

# Install Grain, see https://grain-lang.org/docs/getting_grain
ARG GRAIN_URL="https://github.com/grain-lang/grain/releases/download/grain-v0.4.7/grain-linux-x64"
RUN curl -sL "$GRAIN_URL" -o /usr/local/bin/grain && chmod +x /usr/local/bin/grain

# Install AssemblyScript (Node.js dependency), see https://www.assemblyscript.org/getting-started.html
ARG NODEJS_URL="https://nodejs.org/dist/v17.9.0/node-v17.9.0-linux-x64.tar.xz"
RUN curl -sL "$NODEJS_URL" | tar -xJf - -C /usr/local --strip-components=1 --no-same-owner
RUN npm install -g assemblyscript
5 changes: 4 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
"matklad.rust-analyzer",
"tamasfe.even-better-toml",
"serayuzgur.crates",
"fermyon.autobindle"
"fermyon.autobindle",
"golang.Go",
"grain-lang.vscode-grain",
"saulecabrera.asls"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
Expand Down

0 comments on commit 14603bb

Please sign in to comment.