Skip to content

Commit

Permalink
Minor updates to container build (#213)
Browse files Browse the repository at this point in the history
* Don't use host UID:GID for "container_build shell"

The UID:GID does not exist in the container. Just use the root account.

* Switch to c++ -> master brach for DPDK building

* Limit parallelism of grpc build

With "make -j", the system may hang due to too many processes
  • Loading branch information
sangjinhan authored and Barath Raghavan committed Jan 2, 2017
1 parent e41bf6d commit 9bffb00
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ RUN cd /build && \
git clone -b $(curl -s -L http://grpc.io/release) https://github.com/grpc/grpc && \
cd /build/grpc && \
git submodule update --init && \
make -j && \
make -j4 && \
make install && \
cd /build/grpc/third_party/protobuf && \
make -j && \
make -j4 && \
make install && \
rm -rf /build/grpc

Expand Down
2 changes: 1 addition & 1 deletion .travis/rebuild_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

REPOSITORY=${REPOSITORY:-nefelinetworks/bess_build}
VERSION=${VERSION:-`date +%y%m%d`}
docker build --build-arg BESS_DPDK_BRANCH=${BESS_DPDK_BRANCH:-c++} -t $REPOSITORY:latest -t $REPOSITORY:$VERSION .
docker build --build-arg BESS_DPDK_BRANCH=${BESS_DPDK_BRANCH:-master} -t $REPOSITORY:latest -t $REPOSITORY:$VERSION .

echo Build succeeded: $REPOSITORY:$VERSION
echo Build succeeded: $REPOSITORY:latest
Expand Down
4 changes: 2 additions & 2 deletions container_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def run_docker_cmd(cmd):


def run_shell():
run_cmd('docker run -e CXX -e DEBUG --rm -u %d:%d -it -v %s:%s %s' %
(os.getuid(), os.getgid(), BESS_DIR_HOST, BESS_DIR_CONTAINER, IMAGE))
run_cmd('docker run -e CXX -e DEBUG --rm -it -v %s:%s %s' %
(BESS_DIR_HOST, BESS_DIR_CONTAINER, IMAGE))


def build_bess():
Expand Down

0 comments on commit 9bffb00

Please sign in to comment.