Skip to content

Latest commit

 

History

History
64 lines (42 loc) · 1.29 KB

README.md

File metadata and controls

64 lines (42 loc) · 1.29 KB

hello-world

Just a simple hello world program on different languages and just use Docker to run it. Nothing else.

Languages

Quick Start

Go to project directory folder and run below commands for each particular language.

C

docker run -v ./c:/usr/src/app -w /usr/src/app -it --rm gcc:latest sh -c "gcc -o main main.c && ./main"

C++

docker run -v ./c++:/usr/src/app -w /usr/src/app -it --rm buildpack-deps:latest sh -c "g++ -o main main.cpp && ./main"

Go

docker run -v ./go:/go/src/app -w /go/src/app golang:latest go run main.go

JavaScript

docker run -v ./javascript:/usr/src/app -w /usr/src/app node:latest node main.js

PHP (CLI)

docker run -v ./php:/usr/src/app -w /usr/src/app php:latest php main.php

Rust

docker run -v ./rust:/usr/src/app -w /usr/src/app -it --rm rust:latest sh -c "rustc main.rs && ./main"

Zig

docker run -v ./zig:/usr/src/app -w /usr/src/app -it --rm buddyspencer/ziglang:latest sh -c "zig build-exe main.zig && ./main"

License

MIT

Maintained by Sony Arianto Kurniawan <sony@sony-ak.com> and contributors.