Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Node, .NET Core, Python, Ruby, Rust, Kotlin and Swift build/runtime environments in Docker
docker run -v [local path]:/code -it node bash
cd /code
echo "console.log('Hello, World');" > app.js
node app.js
docker run -v [local path]:/code -it microsoft/dotnet bash
cd /code
dotnet new console
dotnet run
docker run -v [local path]:/code -it python:3 bash
cd /code
echo "print(\"Hello, World\")" > app.py
python app.py
docker run -v [local path]:/code -it ruby bash
cd /code
echo "puts 'Hello, World'" > app.rb
ruby app.rb
docker run -v [local path]:/code -it rust bash
cd /code
echo "fn main() { println!(\"Hello, World\");}" > app.rs
rustc app.rs
./app
docker run -v [local path]:/code -it zenika/alpine-kotlin bash
cd /code
echo "fun main(args: Array<String>){ println(\"Hello, World\")}" > app.kt
kotlinc app.kt -include-runtime -d app.jar
java -jar app.jar
docker run -v [local path]:/code -it swift bash
cd /code
echo "print(\"Hello, World\")" > app.swift
swift app.swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.