Skip to content

Instantly share code, notes, and snippets.

@SeverTopan
Created March 26, 2021 23:53
Show Gist options
  • Save SeverTopan/46e02264ac2c5ebf38b4a040c1d93d83 to your computer and use it in GitHub Desktop.
Save SeverTopan/46e02264ac2c5ebf38b4a040c1d93d83 to your computer and use it in GitHub Desktop.
Dockerfile for Beluga Installation
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