Skip to content

Commit

Permalink
Introduce Dockerfiles for old Ubuntu versions 14.04 and 16.04
Browse files Browse the repository at this point in the history
  • Loading branch information
fspindle committed Dec 19, 2024
1 parent 6cebb2e commit 9901f92
Show file tree
Hide file tree
Showing 2 changed files with 214 additions and 0 deletions.
103 changes: 103 additions & 0 deletions ci/docker/ubuntu-14.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
FROM ubuntu:14.04

ARG DEBIAN_FRONTEND=noninteractive
ARG USER_UID=1001
ENV TZ=Europe/Paris

# Update aptitude with default packages
RUN apt-get update \
&& apt-get install -y \
build-essential \
cmake \
cmake-curses-gui \
curl \
gedit \
gdb \
git \
iputils-ping \
locales \
locate \
lsb-release \
nano \
net-tools \
software-properties-common \
sudo \
tzdata \
vim \
wget \
&& apt-get clean

# Update aptitude with recommended ViSP 3rd parties
RUN apt-get update \
&& apt-get install -y \
libdc1394-22-dev \
libeigen3-dev \
liblapack-dev \
libopencv-dev \
libv4l-dev \
libx11-dev \
libzbar-dev \
&& apt-get clean

# Update aptitude with other optional ViSP 3rd parties
RUN apt-get update \
&& apt-get install -y \
libcoin80-dev \
libjpeg-dev \
libpng-dev \
libogre-1.9-dev \
libois-dev \
libdmtx-dev \
&& apt-get clean

# Set Locale
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

RUN useradd -U --uid $USER_UID -ms /bin/bash ${USERNAME} \
&& echo "${USERNAME}:${USERNAME}" | chpasswd \
&& adduser ${USERNAME} sudo \
&& echo "$USERNAME ALL=NOPASSWD: ALL" >> /etc/sudoers.d/${USERNAME} \
&& adduser ${USERNAME} video

# Commands below are now run as normal user
USER ${USERNAME}

# When running a container start in the home folder
WORKDIR /home/$USERNAME

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

# Install visp-images
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

# Download cmake 3.32.2 linux-x86_64
RUN mkdir -p ${VISP_WS}/3rdparty/cmake \
&& cd ${VISP_WS}/3rdparty/cmake \
&& curl -SLO https://github.com/Kitware/CMake/archive/refs/tags/v3.10.0.tar.gz \
&& tar xvzf v3.10.0.tar.gz \
&& cd CMake-3.10.0 \
&& sh bootstrap --prefix=/usr \
&& make -j$(nproc) \
&& sudo make install

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

# Build visp
RUN cd ${VISP_WS} \
&& mkdir visp-build \
&& cd visp-build \
&& cmake ../visp \
&& make -j$(nproc)

CMD ["/bin/bash"]
111 changes: 111 additions & 0 deletions ci/docker/ubuntu-16.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
FROM ubuntu:16.04

ARG DEBIAN_FRONTEND=noninteractive
ARG USER_UID=1001
ENV TZ=Europe/Paris

# Update aptitude with default packages
RUN apt-get update \
&& apt-get install -y \
build-essential \
cmake \
cmake-curses-gui \
curl \
gedit \
gdb \
git \
iputils-ping \
locales \
locate \
lsb-release \
mercurial \
nano \
net-tools \
python3 \
python3-dev \
python3-pip \
python3-dbg \
python3-empy \
python3-numpy \
python3-pip \
python3-psutil \
python3-venv \
software-properties-common \
sudo \
tzdata \
vim \
wget \
&& apt-get clean

# Update aptitude with recommended ViSP 3rd parties
RUN apt-get update \
&& apt-get install -y \
libdc1394-22-dev \
libeigen3-dev \
liblapack-dev \
libopencv-dev \
libv4l-dev \
libx11-dev \
libzbar-dev \
&& apt-get clean

# Update aptitude with other optional ViSP 3rd parties
RUN apt-get update \
&& apt-get install -y \
libpcl-dev \
libcoin80-dev \
libjpeg-dev \
libpng-dev \
libogre-1.9-dev \
libois-dev \
libdmtx-dev \
libgsl-dev \
&& apt-get clean

# Set Locale
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

RUN useradd -U --uid $USER_UID -ms /bin/bash ${USERNAME} \
&& echo "${USERNAME}:${USERNAME}" | chpasswd \
&& adduser ${USERNAME} sudo \
&& echo "$USERNAME ALL=NOPASSWD: ALL" >> /etc/sudoers.d/${USERNAME} \
&& adduser ${USERNAME} video

# Commands below are now run as normal user
USER ${USERNAME}

# When running a container start in the home folder
WORKDIR /home/$USERNAME

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

# Install visp-images
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

# Download cmake 3.32.2 linux-x86_64
RUN mkdir -p ${VISP_WS}/3rdparty/cmake \
&& cd ${VISP_WS}/3rdparty/cmake \
&& curl -SLO https://github.com/Kitware/CMake/releases/download/v3.31.2/cmake-3.31.2-linux-x86_64.sh \
&& sudo sh cmake-3.31.2-linux-x86_64.sh --prefix=/usr --skip-license

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

# Build visp
RUN cd ${VISP_WS} \
&& mkdir visp-build \
&& cd visp-build \
&& cmake ../visp \
&& make -j$(nproc)

CMD ["/bin/bash"]

0 comments on commit 9901f92

Please sign in to comment.