Skip to content

Instantly share code, notes, and snippets.

@renatoalencar
Created November 10, 2021 13:08
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renatoalencar/0dcd492d2dd08386b6fb0cbd0a8ae11b to your computer and use it in GitHub Desktop.
Save renatoalencar/0dcd492d2dd08386b6fb0cbd0a8ae11b to your computer and use it in GitHub Desktop.
OCaml static linking with Opam for AWS lambda runtime
FROM alpine
RUN apk add opam git musl-dev make m4 gcc bubblewrap bash coreutils pkgconfig openssl-libs-static openssl-dev
RUN opam init --disable-sandboxing
RUN opam install -y ocaml-base-compiler lambda-runtime dune
WORKDIR /app
COPY . .
RUN eval $(opam env) && dune build --profile=static
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment