Skip to content

Commit

Permalink
Dockerfile for building/installing blockstack-core, Dockerfile for CI…
Browse files Browse the repository at this point in the history
… with codecov
  • Loading branch information
kantai committed Apr 25, 2019
1 parent 7c39455 commit 11f6747
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Dockerfile
target
integration_tests/blockstack-consensus-data/
integration_tests/test-out/
api/data
Expand All @@ -7,3 +9,4 @@ api/data
testnet/index.html
testnet.log
testnet-logs*
legacy
28 changes: 23 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
FROM python:onbuild
ENV PORT 8080
EXPOSE 8080
ENTRYPOINT ["python"]
CMD ["app.py"]
FROM rust:latest

WORKDIR /src/

# Hacks to cache the build dependencies.

RUN USER=root cargo new --bin blockstack-core
WORKDIR /src/blockstack-core

COPY ./Cargo.lock ./Cargo.lock
COPY ./Cargo.toml ./Cargo.toml

RUN cargo build --release
RUN rm src/*.rs
RUN rm ./target/release/deps/blockstack_core*

# copy your source tree
COPY . .

RUN cargo build --release
RUN cargo install --path .

CMD ["blockstack-core"]
12 changes: 12 additions & 0 deletions deployment/Dockerfile.circleci
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM circleci/rust

WORKDIR /kcov/

RUN sudo apt-get update
RUN sudo apt-get install cmake binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev git

ENV KCOV_VERSION 34
RUN sudo git clone --single-branch --branch v$KCOV_VERSION https://github.com/SimonKagstrom/kcov.git
RUN cd kcov && sudo cmake . && sudo make -j$(nproc) && sudo make install

RUN cargo install cargo-kcov

0 comments on commit 11f6747

Please sign in to comment.