Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile and include make command #792

Merged
merged 6 commits into from
Oct 28, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# docker build -t forest:latest -f ./Dockerfile .
# docker run forest

FROM rust:1.42-stretch AS build-env
FROM rust:1.47-buster AS build-env

WORKDIR /usr/src/forest
COPY . .
Expand All @@ -17,8 +17,8 @@ RUN rm -f $PROTOC_ZIP

# 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 \
apt-get install --no-install-recommends -y curl file gcc g++ hwloc libhwloc-dev git make openssh-client \
ca-certificates autoconf automake cmake libtool libcurl4 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

Expand All @@ -27,6 +27,13 @@ RUN cargo install --path forest
# Prod image for forest binary
FROM debian:buster-slim

# Install binary dependencies
RUN apt-get update && \
apt-get install --no-install-recommends -y curl file gcc g++ hwloc libhwloc-dev make openssh-client \
autoconf automake cmake libtool libcurl4 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 ca-certificates
dutterbutter marked this conversation as resolved.
Show resolved Hide resolved

# Copy over binaries from the build-env
COPY --from=build-env /usr/local/cargo/bin/forest /usr/local/bin/forest

Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ build:
release:
cargo build --release --bin forest

docker-run:
docker build -t forest:latest -f ./Dockerfile . && docker run forest

# Git submodule test vectors
pull-serialization-tests:
git submodule update --init
Expand Down