2019-05-24 01:06:15 +04:00
|
|
|
# We could use one of the nomadiclab's docker images as a base instead
|
2019-05-27 14:06:56 +04:00
|
|
|
# We're using 4.06 instead of 4.06.1, if this causes problems build a custom 4.06.1 image instead
|
2019-05-24 01:06:15 +04:00
|
|
|
FROM ocaml/opam2:4.06
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
2019-05-27 14:06:56 +04:00
|
|
|
# Add contents of the current directory to /ligo where it can be
|
|
|
|
# accessed when building the image.
|
|
|
|
#
|
|
|
|
# This is useful when building either locally, or on the CI
|
|
|
|
# because the currently checkout out version (from git) will be used
|
|
|
|
# to build the image
|
|
|
|
ADD . /ligo
|
|
|
|
|
|
|
|
# Set the current working directory to /ligo for
|
|
|
|
# the upcoming scripts
|
|
|
|
WORKDIR /ligo
|
|
|
|
|
2019-05-24 01:06:15 +04:00
|
|
|
# Install required native dependencies
|
2019-05-28 22:54:37 +04:00
|
|
|
RUN sh scripts/install_native_dependencies.sh
|
|
|
|
|
2019-09-06 06:02:18 +04:00
|
|
|
# Install OPAM
|
|
|
|
# TODO: or scripts/install_build_environment.sh ?
|
|
|
|
RUN sh scripts/install_opam.sh
|
|
|
|
|
|
|
|
# Creat opam switch
|
|
|
|
RUN sh scripts/setup_switch.sh
|
2019-05-24 01:06:15 +04:00
|
|
|
|
|
|
|
RUN opam update
|
|
|
|
|
2019-05-27 14:06:56 +04:00
|
|
|
# Install ligo
|
2019-09-06 06:02:18 +04:00
|
|
|
RUN sh scripts/install_vendors_deps.sh
|
2019-05-28 22:54:37 +04:00
|
|
|
RUN sh scripts/install_ligo_with_dependencies.sh
|
2019-05-24 01:06:15 +04:00
|
|
|
|
|
|
|
# Use the ligo binary as a default command
|
2019-05-27 14:43:12 +04:00
|
|
|
ENTRYPOINT [ "/home/opam/.opam/4.06/bin/ligo" ]
|