Skip to content

Commit

Permalink
Add Dockerile for Ubuntu 20.04
Browse files Browse the repository at this point in the history
Support building using Docker. Simplifies checking for breaking changes on Linux when developing on MacOS.
  • Loading branch information
zmeyc authored and hoffmang9 committed Mar 8, 2021
1 parent 3ab95e6 commit ca5d9a6
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*
!lib/
!python-bindings/
!src/
!tests/
!tools/
!uint128_t/
!CMakeLists.txt
!LICENSE
!README.md

32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM ubuntu:20.04 as builder

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y

RUN apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
git \
python3 \
python3-dev \
python3-distutils \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY . .

RUN mkdir -p build

WORKDIR /app/build
RUN cmake ../
RUN cmake --build . -- -j `nproc`


FROM ubuntu:20.04

COPY --from=builder /app/build /app

CMD ["/app/ProofOfSpace"]

3 changes: 3 additions & 0 deletions docker-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
docker build -t chiapos:dev .

3 changes: 3 additions & 0 deletions docker-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
docker run -it --rm chiapos:dev /app/RunTests

0 comments on commit ca5d9a6

Please sign in to comment.