FROM git.h2t.iar.kit.edu:5050/sw/armarx/armarx-gui:latest-bionic

# Setup environment.
SHELL ["/bin/bash", "-c"]

# Setup apt environment.
RUN apt-get -qq update

# Setup repository in Docker.
WORKDIR $ARMARX_WORKSPACE/armarx/RobotAPI
COPY --chmod=755 . .

# Use workspace config.
COPY docker/armarx-workspace.json $ARMARX_WORKSPACE/armarx-workspace.json

# Fix "CMake Error in CMakeLists.txt: Imported target "VirtualRobot" includes non-existent path "/usr/lib/include"
# (caused by at least dmp)
RUN mkdir -p /usr/lib/include

# Run the upgrade.
RUN axii workspace system --accept-apt-install
# ToDo: Prevent this from updating the target itself.
RUN axii workspace update --prefer-https
RUN axii workspace upgrade