commit 1893901a593c15d565e31a1953c8ef85459b6b5a
parent 22e8f9c4c72536bbe8a07f45d16ec92e94b933a0
Author: Andrew Laack <andrew@laack.co>
Date: Wed, 2 Sep 2026 16:48:53 -0500
Make container use /data
Diffstat:
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/learning/Containerfile b/learning/Containerfile
@@ -1,15 +1,16 @@
FROM ocaml/opam:alpine-ocaml-5.6-flambda
+RUN sudo apk add gmp-dev
+
COPY . /app
WORKDIR /app
-RUN sudo apk add gmp-dev
-
RUN opam install . --deps-only
RUN sudo /home/opam/.opam/5.6/bin/dune build
RUN sudo chown -R opam /app
-ENTRYPOINT ["/app/_build/install/default/bin/learning"]
+# this will use the /data directory for courses.
+ENTRYPOINT ["/app/_build/install/default/bin/learning", "/data"]
diff --git a/learning/Makefile b/learning/Makefile
@@ -4,8 +4,12 @@ clean:
build-container:
podman build . -t "ocaml"
+# This is how the container will run when distributed,
+# not for development. Run `make run` if you want to
+# run locally.
+
run-container: container-build
- podman run --mount type=bind,src=.,dst=/app -it "ocaml" bash
+ podman run -p 3000:8080 ocaml
fmt:
opam exec -- dune fmt