add an example hello world image

This commit is contained in:
Tim Dysinger 2015-04-23 16:28:47 -10:00
parent ace3aa8499
commit 477b891017
4 changed files with 26 additions and 0 deletions

3
example/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
*.hi
*.o
hello

6
example/Dockerfile Normal file
View file

@ -0,0 +1,6 @@
#-*- mode:conf; -*-
FROM haskell-scratch
ADD hello /usr/bin/hello
CMD hello

16
example/Makefile Normal file
View file

@ -0,0 +1,16 @@
default: run
hello:
@ghc hello.hs
@strip hello
image: | hello
@docker build -t haskell-scratch:hello .
run: | image
@docker run --rm --name hello -i -t haskell-scratch:hello
clean:
@rm -rf hello
.PHONY: default image run

1
example/hello.hs Normal file
View file

@ -0,0 +1 @@
main = putStrLn "Hello World"