Skip to content

Add initial devcontainers #862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/ubuntu/.devcontainer/base.Dockerfile

# [Choice] Ubuntu version: bionic, focal
ARG VARIANT="focal"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends build-essential software-properties-common xz-utils g++ sbcl julia python3 python3-pip python3-dev ghc openjdk-11-jdk rustc libssl-dev gfortran libxml2-dev libyaml-dev libgmp-dev libz-dev libncurses5 gnuplot nodejs npm lua5.3 ocaml php ruby-full gnu-smalltalk scratch

# Setup Crystal
RUN echo 'deb http://download.opensuse.org/repositories/devel:/languages:/crystal/xUbuntu_20.04/ /' | sudo tee /etc/apt/sources.list.d/devel:languages:crystal.list
RUN curl -fsSL https://download.opensuse.org/repositories/devel:languages:crystal/xUbuntu_20.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_languages_crystal.gpg > /dev/null

# Setup Dart
RUN sudo sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
RUN sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'

# Setup Powershell
RUN sudo sh -c 'wget -q https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb'
RUN sudo sh -c 'dpkg -i packages-microsoft-prod.deb'

# Setup Clojure
RUN sudo sh -c 'curl -O https://download.clojure.org/install/linux-install-1.10.3.967.sh'
RUN sudo sh -c 'chmod +x linux-install-1.10.3.967.sh'
RUN sudo sh -c 'sudo ./linux-install-1.10.3.967.sh'

# Setup dotnet
RUN sudo sh -c 'wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb'
RUN sudo sh -c 'sudo dpkg -i packages-microsoft-prod.deb'
RUN sudo sh -c 'rm packages-microsoft-prod.deb'

# Setup D Lang
RUN sudo sh -c 'mkdir -p ~/dlang && wget https://dlang.org/install.sh -O ~/dlang/install.sh'
RUN sudo sh -c 'bash ~/dlang/install.sh'
## From Docs not needed though
# RUN sudo sh -c 'source ~/dlang/dmd-2.097.2/activate'
ENV PATH=$PATH:/root/dlang/dmd-2.097.2/linux/bin64

# Setup Go
RUN sudo sh -c 'wget -c https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to extract, isn't it usually tar xvzf? You can drop the v, but shouldn't it be xvf, then?

ENV PATH=$PATH:/usr/local/go/bin

# Setup Kotlin (doesnt unzip right maybe?)
RUN sudo sh -c 'wget -c https://github.com/JetBrains/kotlin/releases/download/v1.5.30/kotlin-compiler-1.5.30.zip -O /usr/local/kotlinc.zip'
RUN unzip /usr/local/kotlinc.zip
ENV PATH=$PATH:/usr/local/kotlinc/bin

# Setup lolcode
## Use: https://github.com/justinmeza/lci

# Setup Piet
## Use: https://github.com/boothby/repiet


# Setup Matlab
# ?????? This is a licensed language???

# Setup Emojicode (in progress)
RUN sudo sh -c 'wget -c https://github.com/emojicode/emojicode/releases/download/v1.0-beta.2/Emojicode-1.0-beta.2-Linux-x86_64.tar.gz -O /usr/local/Emojicode-1.0-beta.2-Linux-x86_64.tar.gz'
RUN sudo tar -xvzf /usr/local/Emojicode-1.0-beta.2-Linux-x86_64.tar.gz
# && cd ~/emojicode/ && echo && ./install.sh'
ENV PATH=$PATH:/usr/local/Emojicode-1.0-beta.2-Linux-x86_64

# Setup Factor (in progress)
RUN mkdir -p ~/factor && wget https://downloads.factorcode.org/releases/0.98/factor-linux-x86-64-0.98.tar.gz -O ~/factor/factor.tar.gz
RUN tar -xzf /root/factor/factor.tar.gz
# && rm ~/factor/factor.tar.gz
ENV PATH=$PATH:/root/factor/factor

# Setup R
RUN sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
RUN sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'

# Setup Racket
## Use: https://ubunlog.com/en/racket-install-ubuntu-programming-language

# Setup Scheme
## Use: https://github.com/ashinn/chibi-scheme

# Setup Scratch
## using 1.x right now.... in future checkout snap or adobe air?

# Setup Swift
## ?

# Setup viml
## ?

# Setup whitespace
## ?

# Setup Elm
## https://github.com/elm/compiler/blob/master/installers/linux/README.md

# Setup V
## https://github.com/vlang/v/blob/master/doc/docs.md


# Install the packages that needed extra help
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends crystal dart nim powershell scala dotnet-sdk-5.0 r-base

RUN pip install wheel matplotlib numpy coconut

RUN sudo sh -c 'npm install -g typescript'
26 changes: 26 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/ubuntu
{
"name": "Ubuntu",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Ubuntu version: focal, bionic
"args": { "VARIANT": "focal" }
},

// Set *default* container specific settings.json values on container create.
"settings": {},


// Add the IDs of extensions you want installed when the container is created.
"extensions": [],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}