From a4cfaf311a1f62d8e579f80cdfec4692154a9cd5 Mon Sep 17 00:00:00 2001
From: Guilhem Saurel <guilhem.saurel@laas.fr>
Date: Tue, 20 Aug 2019 11:10:45 +0200
Subject: [PATCH] docker/pinocchio: python3 by default

---
 docker/pinocchio/Dockerfile | 11 ++++++++---
 docker/pinocchio/README.md  |  5 -----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/docker/pinocchio/Dockerfile b/docker/pinocchio/Dockerfile
index c6cdaaf..07e383f 100644
--- a/docker/pinocchio/Dockerfile
+++ b/docker/pinocchio/Dockerfile
@@ -3,6 +3,7 @@ FROM ubuntu:$UBUNTU
 
 # Setup Robotpkg apt binary repository
 ARG UBUNTU=bionic
+ENV UBUNTU=$UBUNTU
 RUN apt-get update -y && apt-get install -y \
     build-essential \
     cmake \
@@ -10,6 +11,8 @@ RUN apt-get update -y && apt-get install -y \
     git \
  && echo "deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $UBUNTU robotpkg" \
  >> /etc/apt/sources.list.d/robotpkg.list \
+ && echo "deb [arch=amd64] http://robotpkg.openrobots.org/wip/packages/debian/pub $UBUNTU robotpkg" \
+ >> /etc/apt/sources.list.d/robotpkg.list \
  && curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key | apt-key add - \
  && rm -rf /var/lib/apt/lists/*
 
@@ -22,6 +25,7 @@ ENV CMAKE_PREFIX_PATH=$ROBOTPKG_BASE:$CMAKE_PREFIX_PATH \
 
 # get Pinocchio dependencies
 ARG PYTHON=python3
+ENV PYTHON=$PYTHON
 RUN apt-get update -y \
  && apt-get install -y \
     $(echo $PYTHON | sed 's/2//') \
@@ -44,7 +48,8 @@ RUN git clone --recursive --branch $BRANCH https://github.com/$NAMESPACE/pinocch
 
 WORKDIR /pinocchio/build
 ARG MAKE_JOBS=1
+ENV CTEST_PARALLEL_LEVEL=$MAKE_JOBS CTEST_OUTPUT_ON_FAILURE=true
 RUN cmake -DPYTHON_EXECUTABLE=$(which $PYTHON) .. \
- && make -j$MAKE_JOBS
-
-CMD make test
+ && make -j$MAKE_JOBS \
+ && make test \
+ && make install
diff --git a/docker/pinocchio/README.md b/docker/pinocchio/README.md
index 4d9a649..6d30b0e 100644
--- a/docker/pinocchio/README.md
+++ b/docker/pinocchio/README.md
@@ -8,7 +8,6 @@ If the buildfarm doesn't work in your case, you could use this.
 docker build -t gepetto/utils:pinocchio-18.04 .
 docker build -t gepetto/utils:pinocchio-16.04 --build-arg UBUNTU=xenial .
 docker build -t gepetto/utils:pinocchio-14.04 --build-arg UBUNTU=trusty .
-docker build -t gepetto/utils:pinocchio-18.04-py3 --build-arg PYTHON=python3 .
 ```
 
 # Push images
@@ -17,7 +16,6 @@ docker build -t gepetto/utils:pinocchio-18.04-py3 --build-arg PYTHON=python3 .
 docker push gepetto/utils:pinocchio-18.04
 docker push gepetto/utils:pinocchio-16.04
 docker push gepetto/utils:pinocchio-14.04
-docker push gepetto/utils:pinocchio-18.04-py3
 ```
 
 # Pull an image
@@ -26,7 +24,6 @@ docker push gepetto/utils:pinocchio-18.04-py3
 docker pull gepetto/utils:pinocchio-18.04
 docker pull gepetto/utils:pinocchio-16.04
 docker pull gepetto/utils:pinocchio-14.04
-docker pull gepetto/utils:pinocchio-18.04-py3
 ```
 
 # Run test
@@ -35,7 +32,6 @@ docker pull gepetto/utils:pinocchio-18.04-py3
 docker run --rm -it gepetto/utils:pinocchio-18.04
 docker run --rm -it gepetto/utils:pinocchio-16.04
 docker run --rm -it gepetto/utils:pinocchio-14.04
-docker run --rm -it gepetto/utils:pinocchio-18.04-py3
 ```
 
 # Enter in the image
@@ -44,5 +40,4 @@ docker run --rm -it gepetto/utils:pinocchio-18.04-py3
 docker run --rm -it gepetto/utils:pinocchio-18.04 bash
 docker run --rm -it gepetto/utils:pinocchio-16.04 bash
 docker run --rm -it gepetto/utils:pinocchio-14.04 bash
-docker run --rm -it gepetto/utils:pinocchio-18.04-py3 bash
 ```
-- 
GitLab