Created
March 26, 2021 23:53
-
-
Save SeverTopan/46e02264ac2c5ebf38b4a040c1d93d83 to your computer and use it in GitHub Desktop.
Dockerfile for Beluga Installation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from debian:buster | |
# Setup. | |
workdir /workspace | |
run apt-get update && apt-get install -y git opam rlwrap | |
# Clone Beluga. | |
run git clone https://github.com/Beluga-lang/Beluga.git | |
# Setup opam. | |
run opam init -y --bare --disable-sandboxing | |
run opam switch create ocaml-base-compiler.4.09.0 | |
workdir /workspace/Beluga | |
run opam install -y . | |
# Compile. Note that `eval $(opam env)` doesn't work in docker. | |
run opam env > /workspace/setup.sh && chmod 777 /workspace/setup.sh | |
run /bin/bash -c "source /workspace/setup.sh && make" | |
# Activeate opam env on entrypoint. | |
entrypoint /bin/bash -c "source /workspace/setup.sh && /bin/bash" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment