ligo/docker/distribution/generic/build.Dockerfile

36 lines
809 B
Docker
Raw Normal View History

ARG target
FROM ocaml/opam2:${target}
2019-12-16 14:33:16 -06:00
ARG ci_job_id
ENV CI_JOB_ID=$ci_job_id
RUN opam switch 4.07 && eval $(opam env)
USER root
2019-05-27 12:06:56 +02: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
# Install required native dependencies
2019-05-28 20:54:37 +02:00
RUN sh scripts/install_native_dependencies.sh
2019-09-07 13:52:00 -07:00
# Add tezos repository
RUN sh scripts/setup_repos.sh
RUN opam update
2019-05-27 12:06:56 +02:00
# Install ligo
2019-09-06 04:02:18 +02:00
RUN sh scripts/install_vendors_deps.sh
2019-12-16 14:32:10 -06:00
RUN opam install -y .
# Use the ligo binary as a default command
2019-09-07 13:52:00 -07:00
ENTRYPOINT [ "/home/opam/.opam/4.07/bin/ligo" ]