diff --git a/example/.gitignore b/example/.gitignore new file mode 100644 index 0000000..476736b --- /dev/null +++ b/example/.gitignore @@ -0,0 +1,3 @@ +*.hi +*.o +hello diff --git a/example/Dockerfile b/example/Dockerfile new file mode 100644 index 0000000..90f4bac --- /dev/null +++ b/example/Dockerfile @@ -0,0 +1,6 @@ +#-*- mode:conf; -*- + +FROM haskell-scratch + +ADD hello /usr/bin/hello +CMD hello diff --git a/example/Makefile b/example/Makefile new file mode 100644 index 0000000..07f4d89 --- /dev/null +++ b/example/Makefile @@ -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 diff --git a/example/hello.hs b/example/hello.hs new file mode 100644 index 0000000..73566f6 --- /dev/null +++ b/example/hello.hs @@ -0,0 +1 @@ +main = putStrLn "Hello World"