This demonstrates "Hello World" in 100 languages (one day...) and their corresponding build/runtime environments. It's a fun way to explore different languages. You can checkout the prebuilt images on Docker Hub.
- Docker (versions unclear, works with 20.10.18)
- Make (versions unclear, works with GNU Make 4.3)
git clone [email protected]:frison/100hellos.git
cd 100hellos
# cat for the cool factor
cat perl/files/hello-world.pl
make perl R=1
# Hello World! From perl.
docker run --rm 100hellos/perl:latest
# Or for an interactive shell
docker run --rm -it 100hellos/perl:latest zsh
Pro-tip: R=1
is a shortcut for RUN=1
This will build and run the language container locally. Any changes to the files will require a rebuild by running this command.
Pro-tip: I=1
is a shortcut for INTERACTIVE=1
This will build and run the language container locally, and open an interactive shell into it. Any chances made while inside the container will be lost when the container is stopped.
- Modify the files in the language directory (e.g.
perl/files
) make perl R=1
make perl I=1
- Now you're inside the container
- Head on over to
/hello-world
,vim
is available
- Head on over to
- Modify your files on disk, as you normally would
make [lang] I=1 M=1
- Execute the appropriate command to run your code
- Modify your files on disk, as you normally would
- Execute the appropriate command to run your code (it's a loop!)
- Note how you don't need to rebuild the container between changes
make new HELLO=[lang]
This will create a new directory, Dockerfile, and outline for your language. You can then tweak and explore it with the make [lang]
commands above. Check out the DEVELOPERS.md for more information on contributing.