-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup dockerfiles and update CI (#370)
* Setup dockerfiles and update CI * Update docker ignore files
- Loading branch information
1 parent
68c4f9a
commit c27deab
Showing
6 changed files
with
61 additions
and
23 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,3 @@ | ||
*target** | ||
.git | ||
/test_dir* |
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,26 @@ | ||
# This Dockerfile is for the main forest binary | ||
# Example usage: | ||
# docker build -t forest:latest -f ./Dockerfile . | ||
# docker run forest | ||
|
||
FROM rust:1.42-stretch AS build-env | ||
|
||
WORKDIR /usr/src/forest | ||
COPY . . | ||
|
||
# Extra dependencies needed for rust-fil-proofs | ||
RUN apt-get update && \ | ||
apt-get install -y curl file gcc g++ git make openssh-client \ | ||
autoconf automake cmake libtool libcurl4-openssl-dev libssl-dev \ | ||
libelf-dev libdw-dev binutils-dev zlib1g-dev libiberty-dev wget \ | ||
xz-utils pkg-config python clang ocl-icd-opencl-dev | ||
|
||
RUN cargo install --path forest | ||
|
||
# Prod image for forest binary | ||
FROM debian:buster-slim | ||
|
||
# Copy over binaries from the build-env | ||
COPY --from=build-env /usr/local/cargo/bin/forest /usr/local/bin/forest | ||
|
||
CMD ["forest"] |
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,20 @@ | ||
# This Dockerfile is used for consistent build environment in CI | ||
# Example usage: | ||
# docker build -t forest/rust:latest -f ./Dockerfile-ci . | ||
# docker run forest/rust cargo c | ||
|
||
FROM rust:1.42-stretch | ||
|
||
WORKDIR /usr/src/forest | ||
COPY . . | ||
|
||
# Extra dependencies needed for rust-fil-proofs | ||
RUN apt-get update && \ | ||
apt-get install -y curl file gcc g++ git make openssh-client \ | ||
autoconf automake cmake libtool libcurl4-openssl-dev libssl-dev \ | ||
libelf-dev libdw-dev binutils-dev zlib1g-dev libiberty-dev wget \ | ||
xz-utils pkg-config python clang ocl-icd-opencl-dev | ||
|
||
RUN bash -l -c 'echo $(rustc --print sysroot)/lib >> /etc/ld.so.conf' | ||
RUN bash -l -c 'echo /usr/local/lib >> /etc/ld.so.conf' | ||
RUN ldconfig |
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