Commit fc9d4fb1 authored by Vlad Dumitru's avatar Vlad Dumitru
Browse files

add dockerfile

parent 009f66a1
# stage 1 -- build
FROM ocaml/opam:debian AS build-stage
RUN mkdir -p /home/opam/build
WORKDIR /home/opam/build
ENV OPAMROOT=/home/opam/build/.opam
ADD . /home/opam/build/
RUN mkdir /home/opam/build/.opam && opam init
RUN cd /home/opam/build && \
opam switch create 4.11.2 && \
opam pin add -yn speechcake . && \
opam depext speechcake && \
opam install --deps-only speechcake
RUN sudo chown -R opam:nogroup /home/opam/build && \
cd /home/opam/build && \
opam config exec dune build && \
opam depext -ln speechcake > depexts && \
cat depexts
# stage 2 -- "production" image
FROM debian:latest
WORKDIR /app
COPY --from=build-stage /home/opam/build/_build/default/bin/konditorei.exe konditorei.exe
COPY --from=build-stage /home/opam/build/depexts depexts
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends $(cat depexts) && \
rm -rf /var/lib/apt/lists/*
CMD /app/konditorei.exe
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment