Skip to content

Commit 9fe95fc

Browse files
committed
PoC of building inside docker container
1 parent c7742c5 commit 9fe95fc

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

docker/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM ubuntu:16.04
2+
3+
RUN echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.9 main" >> /etc/apt/sources.list \
4+
&& apt-get update \
5+
&& apt-get install -y --no-install-recommends --allow-unauthenticated \
6+
cmake \
7+
g++ \
8+
make \
9+
llvm-3.9-dev \
10+
zlib1g-dev \
11+
&& rm -rf /var/lib/apt/lists/*

docker/test.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
set -e
3+
4+
SRC_DIR=$(dirname $(pwd))
5+
6+
CONTAINER=$(docker run -d -v $SRC_DIR:/src:ro chfast/cpp-ethereum-dev tail -f /dev/null)
7+
8+
docker exec $CONTAINER sh -c 'mkdir build && cd build && cmake /src -DLLVM_DIR=/usr/lib/llvm-3.9/lib/cmake/llvm'
9+
docker exec $CONTAINER cmake --build /build
10+
11+
docker kill $CONTAINER

0 commit comments

Comments
 (0)