add an example hello world image
This commit is contained in:
parent
ace3aa8499
commit
477b891017
4 changed files with 26 additions and 0 deletions
3
example/.gitignore
vendored
Normal file
3
example/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
*.hi
|
||||
*.o
|
||||
hello
|
6
example/Dockerfile
Normal file
6
example/Dockerfile
Normal file
|
@ -0,0 +1,6 @@
|
|||
#-*- mode:conf; -*-
|
||||
|
||||
FROM haskell-scratch
|
||||
|
||||
ADD hello /usr/bin/hello
|
||||
CMD hello
|
16
example/Makefile
Normal file
16
example/Makefile
Normal 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
1
example/hello.hs
Normal file
|
@ -0,0 +1 @@
|
|||
main = putStrLn "Hello World"
|
Loading…
Reference in a new issue