forked from move-language/move
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docker] Added Dockerfile for the Move CLI
Added Dockerfile for Move command-line interface for getting started easier. This Dockerfile is based on the CI image found in docker/. Also added building instructions to README.
- Loading branch information
1 parent
f7d5b1a
commit 6941dce
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM debian:buster-20211011@sha256:f9182ead292f45165f4a851e5ff98ea0800e172ccedce7d17764ffaae5ed4d6e | ||
|
||
VOLUME /project | ||
WORKDIR /project | ||
|
||
ADD . /move/ | ||
|
||
#Needed for sccache to function, and to work around home dir being blatted. | ||
ENV CARGO_HOME "/opt/cargo" | ||
ENV RUSTUP_HOME "/opt/rustup" | ||
|
||
ENV DOTNET_ROOT "/opt/dotnet" | ||
ENV Z3_EXE "/opt/bin/z3" | ||
ENV CVC5_EXE "/opt/bin/cvc5" | ||
ENV BOOGIE_EXE "/opt/dotnet/tools/boogie" | ||
ENV SOLC_EXE "/opt/bin/solc" | ||
ENV PATH "/opt/cargo/bin:/usr/lib/golang/bin:/opt/bin:${DOTNET_ROOT}:${DOTNET_ROOT}/tools:$PATH" | ||
|
||
# Batch mode and all operations tooling | ||
RUN mkdir -p /github/home && \ | ||
mkdir -p /opt/cargo/ && \ | ||
mkdir -p /opt/git/ && \ | ||
/move/scripts/dev_setup.sh -t -b -p -y -d -n && \ | ||
apt-get install -y git && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Compile a small rust tool? But we already have in dev_setup (sccache/grcov)...? | ||
# Test that all commands we need are installed and on the PATH | ||
RUN [ -x "$(set -x; command -v rustup)" ] \ | ||
&& [ -x "$(set -x; command -v cargo)" ] \ | ||
&& [ -x "$(set -x; command -v solc)" ] \ | ||
&& [ -x "$(set -x; command -v z3)" ] \ | ||
&& [ -x "$(set -x; command -v "$BOOGIE_EXE")" ] \ | ||
&& [ -x "$(set -x; xargs rustup which cargo --toolchain < /move/rust-toolchain )" ] \ | ||
&& [ -x "$(set -x; command -v clang)" ] \ | ||
&& [ -x "$(set -x; command -v npm)" ] | ||
|
||
RUN cd /move; cargo build -p move-cli | ||
|
||
ENTRYPOINT ["/move/target/debug/move"] |