Site Tools


New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
docker_stepbystep
  • login to docker development host as root
  • install needed kernel packages (use dpkg and not apt)
  • multiple version can be installed
root@dockerhost:~# dpkg --list | grep header
ii  libnl-3-dev                           3.2.24-2                                   amd64        development library and headers for libnl-3
ii  libnl-route-3-dev                     3.2.24-2                                   amd64        development library and headers for libnl-route-3
ii  linux-headers-3.16.0-4+nabi10-amd64   3.16.43-2.ntap+deb8u1+ntap4064             amd64        Header files for Linux 3.16.0-4+nabi10-amd64
ii  linux-headers-3.16.0-4+nabi10-common  3.16.43-2.ntap+deb8u1+ntap4064             amd64        Common header files for Linux 3.16.0-4+nabi10
ii  linux-headers-3.16.0-4+nabi11-amd64   3.16.43-2+deb8u5+ntap4134                  amd64        Header files for Linux 3.16.0-4+nabi11-amd64
ii  linux-headers-3.16.0-4+nabi11-common  3.16.43-2+deb8u5+ntap4134                  amd64        Common header files for Linux 3.16.0-4+nabi11
ii  linux-headers-3.16.0-4-amd64          3.16.43-2+deb8u5                           amd64        Header files for Linux 3.16.0-4-amd64
ii  linux-headers-3.16.0-4-common         3.16.43-2+deb8u5                           amd64        Common header files for Linux 3.16.0-4
ii  linux-headers-3.16.0-5+nabi1-amd64    3.16.51-3+deb8u1+ntap4215                  amd64        Header files for Linux 3.16.0-5+nabi1-amd64
ii  linux-headers-3.16.0-5+nabi1-common   3.16.51-3+deb8u1+ntap4215                  amd64        Common header files for Linux 3.16.0-5+nabi1
ii  linux-headers-amd64                   3.16+63                                    amd64        Header files for Linux amd64 configuration (meta-package)
ii  linux-libc-dev:amd64                  3.16.43-2+deb8u5                           amd64        Linux support headers for userspace development
root@dockerhost:~# 
  • use set fake_uname script to realize the correct return of 'uname -a'
root@dockerhost:~# uname -a
Linux dockerhost 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux
root@dockerhost:~# UTS_RELEASE=3.16.51-3+deb8u1+ntap4215 LD_PRELOAD=$PWD/fake_uname.so bash
root@dockerhost:~# uname -a
Linux dockerhost 3.16.51-3+deb8u1+ntap4215 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux
root@dockerhost:~# 
  • edit Dockerfile if needed. Sample Dockerfile is here:
root@dockerhost:/repo/docker# cat dockerfile-gxfs_both_v1
FROM debian:jessie
LABEL vendor="Alexander Menck Docker GxFS IB and GPFS v1"
RUN echo "##### GPFS local repository ##### \n deb http://188.94.98.67/sscale_adv_4233/gpfs_debs ./" > /etc/apt/sources.list.d/gpfs.list && \
    apt-get -y update && \
    apt-get -y upgrade && \
    apt-get -y install locales kmod supervisor ssh apt-utils telnet iotop lsscsi sysfsutils sg3-utils multipath-tools nfs-common ntp curl vim-common wget infiniband-diags && \
    apt-get -y install lsb-release quilt lsof ethtool libgfortran3 pkg-config dkms m4 autoconf libnl-route-3-dev debhelper pciutils libtool libnuma-dev  \
               automake libltdl-dev gcc libglib2.0-0 autotools-dev swig libnl-route-3-200 libglib2.0-dev chrpath build-essential libnl-3-dev libnl-3-200 \
               libnuma1 graphviz python-libxml2 make libcr-dev linux-headers-3.16.0-4-amd64 dpatch gfortran
RUN mkdir /workdir && \
    curl http://repo.uxns.de/docker/MLNX_OFED_SRC-debian-4.1-1.0.2.0.tgz | /bin/tar xz -C /workdir/ && \
    ls -l /workdir
RUN cd /workdir/MLNX_OFED_SRC-4.1-1.0.2.0 && \
    apt-get -y remove libibnetdisc5 libibumad3 libosmcomp3 libibmad5 && \
    ./install.pl --user-space-only --without-fw-update --all -q
RUN apt-get -y --force-yes install gpfs.base gpfs.ext gpfs.gpl gpfs.gskit gpfs.license.adv gpfs.msg infiniband-diags
RUN curl http://repo.uxns.de/docker/dotssh.tar | /bin/tar x -C /root/  && \
    curl http://repo.uxns.de/docker/etcssh.tar | /bin/tar x -C /etc/ssh/  && \
    curl http://repo.uxns.de/docker/gpfs.gplbin_4.2.3-3_amd64.deb -o /tmp/gplbin.deb && /usr/bin/dpkg --install /tmp/gplbin.deb && \
    curl -o /etc/profile.d/gpfsvars.sh http://repo.uxns.de/docker/gpfsvars.sh && \
    curl -o /etc/supervisor/conf.d/sshd.conf http://repo.uxns.de/docker/sshd.conf && \
    mkdir /var/run/sshd
EXPOSE 22:22
CMD /usr/sbin/sshd && /bin/bash
root@dockerhost:/repo/docker# 
  • create the new docker image (takes around 20-30 minutes)
root@dockerhost:/repo/docker# docker build --no-cache -f dockerfile-gxfs_both_v1 .
Sending build context to Docker daemon  7.315GB
Step 1/9 : FROM debian:jessie
 ---> 86baf4e8cde9
Step 2/9 : LABEL vendor "Alexander Menck Docker GxFS IB and GPFS v1"
 ---> Running in 8707cdc549ba
 ---> 35f5f416e840
Removing intermediate container 8707cdc549ba
Step 3/9 : RUN echo "##### GPFS local repository ##### \n deb http://188.94.98.67/sscale_adv_4233/gpfs_debs ./" > /etc/apt/sources.list.d/gpfs.list &&     apt-get -y update &&     apt-get -y upgrade &&     apt-get -y install locales kmod supervisor ssh apt-utils telnet iotop lsscsi sysfsutils sg3-utils multipath-tools nfs-common ntp curl vim-common wget infiniband-diags &&     apt-get -y install lsb-release quilt lsof ethtool libgfortran3 pkg-config dkms m4 autoconf libnl-route-3-dev debhelper pciutils libtool libnuma-dev                 automake libltdl-dev gcc libglib2.0-0 autotools-dev swig libnl-route-3-200 libglib2.0-dev chrpath build-essential libnl-3-dev libnl-3-200                libnuma1 graphviz python-libxml2 make libcr-dev linux-headers-3.16.0-4-amd64 dpatch gfortran
 ---> Running in f8d741c9ca72
Ign http://188.94.98.67 ./ InRelease

[...]

Removing intermediate container 7ed59e587fd6
Step 8/9 : EXPOSE 22:22
 ---> Running in 13acacd1a40a
 ---> 2e4b7e85992a
Removing intermediate container 13acacd1a40a
Step 9/9 : CMD /usr/sbin/sshd && /bin/bash
 ---> Running in 7949d6df6606
 ---> a889e291cc87
Removing intermediate container 7949d6df6606
Successfully built a889e291cc87
root@dockerhost:/repo/docker#
  • the image is created now. From the image a container needs to be created. This cam be done by interactivly running the image with the 'ti' switch. After that the image an be ended and it can be run using the 'start command.
root@dockerhost:/repo/docker# docker images
REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
<none>                       <none>              a889e291cc87        4 minutes ago       936MB

[...]

centos                       7.2.1511            feac5e0dfdb2        18 months ago       195MB
root@dockerhost:/repo/docker# docker run -ti a889e291cc87
root@fd29eff18079:/# 
root@fd29eff18079:/# exit
root@dockerhost:/repo/docker# docker container ls --all
CONTAINER ID        IMAGE                        COMMAND                  CREATED             STATUS                      PORTS                                            NAMES
fd29eff18079        a889e291cc87                 "/bin/sh -c '/usr/..."   3 minutes ago       Exited (0) 2 minutes ago                                                     condescending_lamport

[...]

1251db783876        portainer/portainer          "/portainer"             6 months ago        Up 4 months                 0.0.0.0:9000->9000/tcp                           lucid_nobel
root@dockerhost:/repo/docker# docker run fd29eff18079
Unable to find image 'fd29eff18079:latest' locally
docker: Error response from daemon: pull access denied for fd29eff18079, repository does not exist or may require 'docker login'.
See 'docker run --help'.
root@dockerhost:/repo/docker# docker start fd29eff18079
fd29eff18079
root@dockerhost:/repo/docker# docker container ls
CONTAINER ID        IMAGE                        COMMAND                  CREATED             STATUS              PORTS                                            NAMES
fd29eff18079        a889e291cc87                 "/bin/sh -c '/usr/..."   3 minutes ago       Up 4 seconds        22/tcp                                           condescending_lamport
9ebf47988469        6a2cfc92d7c1                 "/bin/sh -c '/usr/..."   2 days ago          Up 2 days           22/tcp                                           mystifying_babbage
585f1b871e95        netapp/eseries-webservices   "/bin/sh webserver.sh"   5 weeks ago         Up 5 weeks          0.0.0.0:8080->8080/tcp, 0.0.0.0:8443->8443/tcp   adoring_swanson
cf650897e94c        d8601ed7c0f3                 "/bin/sh -c '/usr/..."   4 months ago        Up 4 months         22/tcp                                           gxfs21
1251db783876        portainer/portainer          "/portainer"             6 months ago        Up 4 months         0.0.0.0:9000->9000/tcp                           lucid_nobel
root@dockerhost:/repo/docker# 
  • export docker container to make it ready for transport
root@dockerhost:/repo/docker# docker export fd29eff18079 > trans_gxfs41.tar
root@dockerhost:/repo/docker#
docker_stepbystep.txt · Last modified: 2022/07/10 09:34 by 127.0.0.1