-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitpod.Dockerfile
45 lines (44 loc) · 2.8 KB
/
.gitpod.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM gitpod/workspace-base:latest
USER root
RUN . /etc/os-release && \
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list && \
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
RUN curl -s https://packagecloud.io/install/repositories/wasmcloud/core/script.deb.sh | bash
RUN apt update && \
install-packages zsh inotify-tools skopeo
USER gitpod
RUN cp /home/gitpod/.profile /home/gitpod/.profile_orig && \
curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable \
&& .cargo/bin/rustup component add \
rust-analysis \
rust-src \
rustfmt \
&& .cargo/bin/rustup completions bash | sudo tee /etc/bash_completion.d/rustup.bash-completion > /dev/null \
&& .cargo/bin/rustup completions bash cargo | sudo tee /etc/bash_completion.d/rustup.cargo-bash-completion > /dev/null \
&& grep -v -F -x -f /home/gitpod/.profile_orig /home/gitpod/.profile > /home/gitpod/.bashrc.d/80-rust
ENV PATH=$PATH:$HOME/.cargo/bin
ENV PATH=$PATH:/usr/local/bin
# share env see https://github.com/gitpod-io/workspace-images/issues/472
ENV GOPATH=$HOME/go-packages
ENV GOROOT=$HOME/go
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH
RUN curl -fsSL https://dl.google.com/go/go1.17.linux-amd64.tar.gz | tar xzs && \
# install VS Code Go tools for use with gopls as per https://github.com/golang/vscode-go/blob/master/docs/tools.md
# also https://github.com/golang/vscode-go/blob/27bbf42a1523cadb19fad21e0f9d7c316b625684/src/goTools.ts#L139
go install -v github.com/uudashr/gopkgs/cmd/gopkgs@v2 && \
go install -v github.com/ramya-rao-a/go-outline@latest && \
go install -v github.com/cweill/gotests/gotests@latest && \
go install -v github.com/fatih/gomodifytags@latest && \
go install -v github.com/josharian/impl@latest && \
go install -v github.com/haya14busa/goplay/cmd/goplay@latest && \
go install -v github.com/go-delve/delve/cmd/dlv@latest && \
go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest && \
go install golang.org/x/tools/cmd/goimports@latest && \
go install -v golang.org/x/tools/gopls@latest && \
sudo rm -rf $GOPATH/src $GOPATH/pkg $HOME/.cache/go $HOME/.cache/go-build && \
printf '%s\n' 'export GOPATH=/workspace/go' \
'export PATH=$GOPATH/bin:$PATH' > $HOME/.bashrc.d/300-go
RUN echo "PATH="${PATH}"" | sudo tee /etc/environment
RUN rustup target add wasm32-unknown-unknown
RUN cargo install wash-cli --git https://github.com/wasmcloud/wash
RUN wget -q https://github.com/tinygo-org/tinygo/releases/download/v0.23.0/tinygo_0.23.0_amd64.deb && sudo dpkg -i tinygo_0.23.0_amd64.deb