forked from jl777/SuperNET
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Try to build on Linux using ubuntu:xenial-20151218.1 based docker image. * Map cargo dependencies cache to host dir. * Fix docker run. * Run tests in docker. * Build Linux binary using xenial image for Github release only. * Try to use host user and workdir avoid various permission and different paths issues. * Set HOME=/root and explicitly set cargo env. * Use target-xenial path in Dockerfile.release. * Release on mm2 branch only again.
- Loading branch information
1 parent
b1b4c23
commit 51dc0a7
Showing
3 changed files
with
66 additions
and
8 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM ubuntu:bionic | ||
WORKDIR /mm2 | ||
COPY target/release/mm2 /app/mm2 | ||
COPY target-xenial/release/mm2 /app/mm2 | ||
EXPOSE 7783 | ||
ENV PATH="/app:${PATH}" | ||
CMD mm2 |
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,26 @@ | ||
FROM ubuntu:xenial-20151218.1 | ||
|
||
RUN \ | ||
apt-get update &&\ | ||
apt-get install -y git build-essential libssl-dev wget &&\ | ||
apt-get install -y cmake &&\ | ||
# https://github.com/rust-lang/rust-bindgen/blob/master/book/src/requirements.md#debian-based-linuxes | ||
apt-get install -y llvm-3.9-dev libclang-3.9-dev clang-3.9 &&\ | ||
# openssl-sys requirements, cf. https://crates.io/crates/openssl-sys | ||
apt-get install -y pkg-config libssl-dev &&\ | ||
apt-get clean | ||
|
||
RUN \ | ||
wget -O- https://sh.rustup.rs > /tmp/rustup-init.sh &&\ | ||
sh /tmp/rustup-init.sh -y --default-toolchain none &&\ | ||
. /root/.cargo/env &&\ | ||
rustup set profile minimal &&\ | ||
rustup install nightly-2020-02-01 &&\ | ||
rustup default nightly-2020-02-01 &&\ | ||
# It seems that bindgen won't prettify without it: | ||
rustup component add rustfmt-preview &&\ | ||
rm -f /tmp/rustup-init.sh &&\ | ||
chmod -R 777 /root | ||
|
||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
WORKDIR /mm2 |
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