Skip to content

Commit da9c27f

Browse files
committed
Add bin/build and bin/run for building and running ocaml:latest
1 parent bbde56c commit da9c27f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

bin/build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker build -t ocaml:latest .

bin/run

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
W=/workspace
2+
# Create container
3+
BUILD="ocamlbuild -quiet -use-ocamlfind cwtest.native"
4+
C=$(docker container create --rm -w $W ocaml:latest sh -c "$BUILD && exec ./cwtest.native")
5+
6+
# Copy files
7+
docker container cp ${1:-examples/basic}/. $C:$W
8+
9+
# Start
10+
docker container start --attach $C

0 commit comments

Comments
 (0)