-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: fikgol <[email protected]> Co-authored-by: jolestar <[email protected]>
- Loading branch information
1 parent
36e02b4
commit 486d08a
Showing
2 changed files
with
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
target/* |
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,59 @@ | ||
FROM ubuntu:bionic AS builder | ||
|
||
RUN set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
gcc \ | ||
libc6-dev \ | ||
git \ | ||
libssl-dev \ | ||
wget \ | ||
pkg-config \ | ||
libclang-dev clang; \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV RUSTUP_HOME=/usr/local/rustup \ | ||
CARGO_HOME=/usr/local/cargo \ | ||
PATH=/usr/local/cargo/bin:$PATH \ | ||
RUSTUP_VERSION=1.22.1 \ | ||
RUSTUP_SHA256=49c96f3f74be82f4752b8bffcf81961dea5e6e94ce1ccba94435f12e871c3bdb \ | ||
RUST_ARCH=x86_64-unknown-linux-gnu | ||
|
||
RUN set -eux; \ | ||
url="https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${RUST_ARCH}/rustup-init"; \ | ||
wget "$url"; \ | ||
echo "${RUSTUP_SHA256} *rustup-init" | sha256sum -c -; \ | ||
chmod +x rustup-init | ||
|
||
ENV RUST_VERSION=1.45.0 | ||
|
||
RUN set -eux; \ | ||
./rustup-init -y --no-modify-path --default-toolchain $RUST_VERSION; \ | ||
rm rustup-init; \ | ||
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \ | ||
rustup --version; \ | ||
cargo --version; \ | ||
rustc --version; | ||
|
||
WORKDIR /starcoin | ||
COPY ./ . | ||
RUN cargo build --release | ||
|
||
FROM ubuntu:bionic | ||
RUN set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
libssl-dev; \ | ||
|
||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV RELEASE_PATH="/starcoin/target/release" | ||
COPY --from=builder $RELEASE_PATH/starcoin \ | ||
$RELEASE_PATH/starcoin_miner \ | ||
$RELEASE_PATH/txfactory \ | ||
$RELEASE_PATH/faucet \ | ||
/starcoin/ | ||
|
||
CMD ["/starcoin/starcoin"] |