Skip to content

Commit

Permalink
Update docker files to user VISP_WS env var
Browse files Browse the repository at this point in the history
  • Loading branch information
fspindle committed Dec 19, 2024
1 parent 3e3b020 commit 6cebb2e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
8 changes: 4 additions & 4 deletions ci/docker/ubuntu-18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ RUN locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
export LANG=en_US.UTF-8

ENV USERNAME vispci
ENV USERNAME=vispci

RUN useradd -U --uid $USER_UID -ms /bin/bash ${USERNAME} \
&& echo "${USERNAME}:${USERNAME}" | chpasswd \
Expand All @@ -82,11 +82,11 @@ USER ${USERNAME}
WORKDIR /home/$USERNAME

# Create visp workspace
ENV VISP_WS /home/$USERNAME/visp-ws
ENV VISP_WS=/home/$USERNAME/visp-ws

# Install visp-images
RUN mkdir -p ${HOME}/visp-ws \
&& cd ${HOME}/visp-ws \
RUN mkdir -p ${VISP_WS} \
&& cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp-images.git \
&& echo "export VISP_WS=${HOME}/visp-ws" >> ${HOME}/.bashrc \
&& echo "export VISP_INPUT_IMAGE_PATH=${HOME}/visp-ws/visp-images" >> ${HOME}/.bashrc
Expand Down
10 changes: 5 additions & 5 deletions ci/docker/ubuntu-20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
export LANG=en_US.UTF-8

ENV USERNAME vispci
ENV USERNAME=vispci

RUN useradd -U --uid $USER_UID -ms /bin/bash ${USERNAME} \
&& echo "${USERNAME}:${USERNAME}" | chpasswd \
Expand All @@ -83,14 +83,14 @@ USER ${USERNAME}
WORKDIR /home/$USERNAME

# Some apps don't show controls without this
ENV QT_X11_NO_MITSHM 1
ENV QT_X11_NO_MITSHM=1

# Create visp workspace
ENV VISP_WS /home/$USERNAME/visp-ws
ENV VISP_WS=/home/$USERNAME/visp-ws

# Install visp-images
RUN mkdir -p ${HOME}/visp-ws \
&& cd ${HOME}/visp-ws \
RUN mkdir -p ${VISP_WS} \
&& cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp-images.git \
&& echo "export VISP_WS=${HOME}/visp-ws" >> ${HOME}/.bashrc \
&& echo "export VISP_INPUT_IMAGE_PATH=${HOME}/visp-ws/visp-images" >> ${HOME}/.bashrc
Expand Down
11 changes: 7 additions & 4 deletions ci/docker/ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
export LANG=en_US.UTF-8

ENV USERNAME vispci
ENV USERNAME=vispci

RUN useradd -U --uid $USER_UID -ms /bin/bash ${USERNAME} \
&& echo "${USERNAME}:${USERNAME}" | chpasswd \
Expand All @@ -83,11 +83,14 @@ USER ${USERNAME}
WORKDIR /home/$USERNAME

# Some apps don't show controls without this
ENV QT_X11_NO_MITSHM 1
ENV QT_X11_NO_MITSHM=1

# Create visp workspace
ENV VISP_WS=/home/$USERNAME/visp-ws

# Install visp-images
RUN mkdir -p ${HOME}/visp-ws \
&& cd ${HOME}/visp-ws \
RUN mkdir -p ${VISP_WS} \
&& cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp-images.git \
&& echo "export VISP_WS=${HOME}/visp-ws" >> ${HOME}/.bashrc \
&& echo "export VISP_INPUT_IMAGE_PATH=${HOME}/visp-ws/visp-images" >> ${HOME}/.bashrc
Expand Down
15 changes: 9 additions & 6 deletions ci/docker/ubuntu-24.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
export LANG=en_US.UTF-8

ENV USERNAME vispci
ENV USERNAME=vispci

RUN useradd -U --uid $USER_UID -ms /bin/bash ${USERNAME} \
&& echo "${USERNAME}:${USERNAME}" | chpasswd \
Expand All @@ -83,21 +83,24 @@ USER ${USERNAME}
WORKDIR /home/$USERNAME

# Some apps don't show controls without this
ENV QT_X11_NO_MITSHM 1
ENV QT_X11_NO_MITSHM=1

# Create visp workspace
ENV VISP_WS=/home/$USERNAME/visp-ws

# Install visp-images
RUN mkdir -p ${HOME}/visp-ws \
&& cd ${HOME}/visp-ws \
RUN mkdir -p ${VISP_WS} \
&& cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp-images.git \
&& echo "export VISP_WS=${HOME}/visp-ws" >> ${HOME}/.bashrc \
&& echo "export VISP_INPUT_IMAGE_PATH=${HOME}/visp-ws/visp-images" >> ${HOME}/.bashrc

# Get visp
RUN cd ${HOME}/visp-ws \
RUN cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp

# Build visp
RUN cd ${HOME}/visp-ws \
RUN cd ${VISP_WS} \
&& mkdir visp-build \
&& cd visp-build \
&& cmake ../visp \
Expand Down

0 comments on commit 6cebb2e

Please sign in to comment.