Project

General

Profile

Support #1230

Providing docker container

Added by Manuel Warum over 1 year ago. Updated over 1 year ago.

Status:
Pending
Priority:
Low
Assignee:
Target version:
-
Start date:
26.04.2017
Due date:
% Done:

0%

Estimated time:
1.00 h

Description

I have briefly investigated if QKD can easily be deployed inside a Docker container.
Ideally, we'd provide a container with a stable, production-grade binary version.
The container is based on a slim version of Debian Jessie that has already

  1. installed dependencies (as declared in README.md)
  2. cloned the git repository's develop branch to /qkd
  3. executed cmake and make in /qkd/build

Building the container image

For development and testing purposes, the provided Dockerfile can be used to build a container:
(assuming the provided Dockerfile is in the current working directory)

docker build --tag qkd --compress --no-cache --pull .
  • --tag qkd names the produced image qkd
  • --compress compresses the build context using gzip
  • --no-cache disallows caching so that the executions of git pull and apt-get install are fresh
  • --pull in case the Jessie base image gets an update

Running the built image

Currently, this image will go straight into a shell with the working directory being /qkd/build.

docker run -it --rm qkd

Remove --rm if you want to keep the container around after shutdown.

Dockerfile (611 Bytes) Dockerfile Manuel Warum, 26.04.2017 17:02
docker-compose.yml (77 Bytes) docker-compose.yml Exemplary, simple docker-compose file Manuel Warum, 16.05.2017 10:23

History

#1 Updated by Manuel Warum over 1 year ago

Current contents of the Dockerfile:

FROM debian:jessie-slim

RUN apt-get update && \
    apt-get install -y \
        build-essential g++ gcc libboost-all-dev libssl-dev uuid-dev cmake libssl-dev \
        libgmp3-dev libzmq3-dev libdbus-1-dev qtbase5-dev qtbase5-dev-tools qdbus-qt5 qdbus doxygen \
        texlive-latex-base texlive-latex-extra texlive-font-utils dbus-x11 libcap2-bin python3 git && \
    git clone -b develop https://git-service.ait.ac.at/quantum-cryptography/qkd.git /qkd && \
    mkdir /qkd/build && \
    cd /qkd/build && \
    cmake .. && \
    make -j3

WORKDIR /qkd/build

#2 Updated by Manuel Warum over 1 year ago

  • File deleted (Dockerfile)

#3 Updated by Manuel Warum over 1 year ago

FROM debian:jessie-slim

ENV QT_SELECT=qt5

RUN apt-get update -q && \
    apt-get install -yq \
        automake autotools-dev \
        build-essential g++ gcc libboost-all-dev libssl-dev uuid-dev cmake libssl-dev \
        libgmp3-dev libzmq3-dev libdbus-1-dev qtbase5-dev qtbase5-dev-tools qdbus-qt5 doxygen \
        texlive-latex-base texlive-latex-extra texlive-font-utils dbus-x11 libcap2-bin python3 git && \
    git clone -q -b develop https://git-service.ait.ac.at/quantum-cryptography/qkd.git /qkd && \
    mkdir /qkd/build && \
    cd /qkd/build && \
    cmake .. && \
    make

WORKDIR /qkd/build

#4 Updated by Oliver Maurhart over 1 year ago

Tried this. I downloaded the current Dockerfile into a fresh mew empty folder and did:

$ docker build --tag qkd --compress --no-cache --pull .
Sending build context to Docker daemon     446B
Step 1/4 : FROM debian:jessie-slim
jessie-slim: Pulling from library/debian
56c7afbcb0f1: Pull complete 
Digest: sha256:12d31a3d5a1f7cb272708be35031ba068dec46fa84af6aeb38aef5c8a83e8974
Status: Downloaded newer image for debian:jessie-slim
 ---> 73ca18563636
Step 2/4 : ENV QT_SELECT qt5
 ---> Running in d36ddc47461d
 ---> 86165193f434
Removing intermediate container d36ddc47461d
Step 3/4 : RUN apt-get update -q &&     apt-get install -yq         automake autotools-dev         build-essential g++ gcc libboost-all-dev libssl-dev uuid-dev cmake libssl-dev         libgmp3-dev libzmq3-dev libdbus-1-dev qtbase5-dev qtbase5-dev-tools qdbus-qt5 doxygen         texlive-latex-base texlive-latex-extra texlive-font-utils dbus-x11 libcap2-bin python3 git &&     git clone -q -b develop https://git-service.ait.ac.at/quantum-cryptography/qkd.git /qkd &&     mkdir /qkd/build &&     cd /qkd/build &&     cmake .. &&     make
 ---> Running in 979a8fe1b25d
Err http://deb.debian.org jessie InRelease

Err http://security.debian.org jessie/updates InRelease

Err http://deb.debian.org jessie-updates InRelease

Err http://security.debian.org jessie/updates Release.gpg
  Temporary failure resolving 'security.debian.org'

Err http://deb.debian.org jessie Release.gpg
  Temporary failure resolving 'deb.debian.org'
Err http://deb.debian.org jessie-updates Release.gpg
  Temporary failure resolving 'deb.debian.org'
Reading package lists...                                                                                                                                                                                                                                                                                        
W: Failed to fetch http://deb.debian.org/debian/dists/jessie/InRelease                                                                                                                                                                                                                                          

W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease                                                                                                                                                                                                                                  

W: Failed to fetch http://security.debian.org/dists/jessie/updates/InRelease                                                                                                                                                                                                                                    

W: Failed to fetch http://deb.debian.org/debian/dists/jessie/Release.gpg  Temporary failure resolving 'deb.debian.org'                                                                                                                                                                                          

W: Failed to fetch http://security.debian.org/dists/jessie/updates/Release.gpg  Temporary failure resolving 'security.debian.org'                                                                                                                                                                               

W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/Release.gpg  Temporary failure resolving 'deb.debian.org'                                                                                                                                                                                  

W: Some index files failed to download. They have been ignored, or old ones used instead.                                                                                                                                                                                                                       
Reading package lists...                                                                                                                                                                                                                                                                                        
Building dependency tree...                                                                                                                                                                                                                                                                                     
E: Unable to locate package automake                                                                                                                                                                                                                                                                            
E: Unable to locate package autotools-dev                                                                                                                                                                                                                                                                       
E: Unable to locate package build-essential                                                                                                                                                                                                                                                                     
E: Unable to locate package gcc                                                                                                                                                                                                                                                                                 
E: Unable to locate package libboost-all-dev                                                                                                                                                                                                                                                                    
E: Unable to locate package libssl-dev                                                                                                                                                                                                                                                                          
E: Unable to locate package uuid-dev                                                                                                                                                                                                                                                                            
E: Unable to locate package cmake                                                                                                                                                                                                                                                                               
E: Unable to locate package libssl-dev                                                                                                                                                                                                                                                                          
E: Unable to locate package libgmp3-dev                                                                                                                                                                                                                                                                         
E: Unable to locate package libzmq3-dev                                                                                                                                                                                                                                                                         
E: Unable to locate package libdbus-1-dev                                                                                                                                                                                                                                                                       
E: Unable to locate package qtbase5-dev                                                                                                                                                                                                                                                                         
E: Unable to locate package qtbase5-dev-tools                                                                                                                                                                                                                                                                   
E: Unable to locate package qdbus-qt5                                                                                                                                                                                                                                                                           
E: Unable to locate package doxygen                                                                                                                                                                                                                                                                             
E: Unable to locate package texlive-latex-base                                                                                                                                                                                                                                                                  
E: Unable to locate package texlive-latex-extra                                                                                                                                                                                                                                                                 
E: Unable to locate package texlive-font-utils                                                                                                                                                                                                                                                                  
E: Unable to locate package dbus-x11                                                                                                                                                                                                                                                                            
E: Unable to locate package python3                                                                                                                                                                                                                                                                             
E: Unable to locate package git                                                                                                                                                                                                                                                                                 
The command '/bin/sh -c apt-get update -q &&     apt-get install -yq         automake autotools-dev         build-essential g++ gcc libboost-all-dev libssl-dev uuid-dev cmake libssl-dev         libgmp3-dev libzmq3-dev libdbus-1-dev qtbase5-dev qtbase5-dev-tools qdbus-qt5 doxygen         texlive-latex-base texlive-latex-extra texlive-font-utils dbus-x11 libcap2-bin python3 git &&     git clone -q -b develop https://git-service.ait.ac.at/quantum-cryptography/qkd.git /qkd &&     mkdir /qkd/build &&     cd /qkd/build &&     cmake .. &&     make' returned a non-zero code: 100                               

Seems to be broken somehow...

#5 Updated by Manuel Warum over 1 year ago

Works for me [tm].
Looks to me like a problem resolving hostnames during the build process. So the building host system might not be 100% kosher in this regard.
I'll try building it on one of our other systems to verify though.

#7 Updated by Oliver Maurhart over 1 year ago

FYI:

$ docker --version
Docker version 17.05.0-ce, build 89658be

Also available in: Atom PDF