ligo/docker/distribution/generic/build.Dockerfile
Alexander Bantyev edb3fce642 Add nix as a build system
* Dynamically linked executables (ligo-bin)
* Statically linked executables (ligo-static)
* Docker (ligo-docker)
* deb package (ligo-deb)
* webide (ligo-editor)
* webide docker (ligo-editor-docker)
* website (ligo-website)
2020-04-29 19:40:04 +01:00

40 lines
943 B
Docker

ARG target
FROM ocaml/opam2:${target}
ARG ci_job_id
ARG ci_commit_sha
ARG commit_date
ENV CI_JOB_ID=$ci_job_id
ENV CI_COMMIT_SHA=$ci_commit_sha
ENV COMMIT_DATE=$commit_date
RUN opam switch 4.07 && eval $(opam env)
USER root
# 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
RUN sh scripts/install_native_dependencies.sh
# Add tezos repository
RUN sh scripts/setup_repos.sh
RUN opam update
# Install ligo
RUN sh scripts/install_vendors_deps.sh
RUN opam install -y . || (tail -n +1 ~/.opam/log/* ; false)
# Use the ligo binary as a default command
ENTRYPOINT [ "/home/opam/.opam/4.07/bin/ligo" ]