2019-08-12 12:41:53 +04:00
|
|
|
ARG target
|
|
|
|
FROM ocaml/opam2:${target}
|
|
|
|
|
2019-12-17 00:33:16 +04:00
|
|
|
ARG ci_job_id
|
2020-03-25 22:14:18 +04:00
|
|
|
ARG ci_commit_sha
|
|
|
|
ARG commit_date
|
2019-12-17 00:33:16 +04:00
|
|
|
ENV CI_JOB_ID=$ci_job_id
|
2020-03-25 22:14:18 +04:00
|
|
|
ENV CI_COMMIT_SHA=$ci_commit_sha
|
|
|
|
ENV COMMIT_DATE=$commit_date
|
2019-12-17 00:33:16 +04:00
|
|
|
|
2019-08-12 12:41:53 +04:00
|
|
|
RUN opam switch 4.07 && eval $(opam env)
|
2019-05-24 01:06:15 +04:00
|
|
|
|
|
|
|
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-08 00:52:00 +04:00
|
|
|
# Add tezos repository
|
|
|
|
RUN sh scripts/setup_repos.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
|
2020-02-11 21:55:31 +04:00
|
|
|
RUN opam install -y . || (tail -n +1 ~/.opam/log/* ; false)
|
2019-05-24 01:06:15 +04:00
|
|
|
|
|
|
|
# Use the ligo binary as a default command
|
2019-09-08 00:52:00 +04:00
|
|
|
ENTRYPOINT [ "/home/opam/.opam/4.07/bin/ligo" ]
|