FROM voraus.jfrog.io/docker/voraus-base:8.15.0

# The Python client to install, a requirement or the path of a wheel in the build context.
# x-release-please-start-version
ARG VORAUS_3D_VISU=voraus-3d-visu==3.2.0
# x-release-please-end

RUN useradd -ms /bin/bash localuser

# The build context is mounted so that `VORAUS_3D_VISU` can name a wheel inside it.
RUN --mount=type=bind,target=/context \
    cd /context && pip install \
    --index-url https://voraus.jfrog.io/artifactory/api/pypi/pypi/simple \
    --extra-index-url https://pypi.org/simple \
    voraus-robot-arm==1.4.1 \
    asyncua \
    "${VORAUS_3D_VISU}"

# Create workspace folder
USER localuser
RUN mkdir -p /home/localuser/workspace/

USER root
