ukaea / UDA

Universal Data Access library to provide data over the network in a unified data object.
https://ukaea.github.io/UDA/
Apache License 2.0
11 stars 4 forks source link

Both docker files fails in build #22

Closed kripnerl closed 2 months ago

kripnerl commented 10 months ago

Hi I have tried to build the ubuntu docker with fallowing result:

(base) kripner@xxx:~/xxx/UDA/docker$ docker build - < client.ubuntu.22.10
[+] Building 2.0s (6/12)                                                                                                                                                                            docker:default
 => [internal] load .dockerignore                                                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                                               0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                          0.0s
 => => transferring dockerfile: 1.03kB                                                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/library/ubuntu:22.10                                                                                                                                               1.3s
 => CACHED [1/8] FROM docker.io/library/ubuntu:22.10@sha256:xxx
                                                                                  0.0s
 => [internal] load build context                                                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                                               0.0s
 => ERROR [2/8] RUN apt-get update && apt-get install -y     git     libboost-dev     libboost-program-options-dev     libssl-dev     cmake     build-essential     pkg-config     libxml2-dev     libspdlog  0.7s
------                                                                                                                                                                                                             
 > [2/8] RUN apt-get update && apt-get install -y     git     libboost-dev     libboost-program-options-dev     libssl-dev     cmake     build-essential     pkg-config     libxml2-dev     libspdlog-dev     ninja-build     capnproto     libcapnp-dev     python3-dev     python3-pip     python3-venv:                                                                                                                            
0.361 Ign:1 http://security.ubuntu.com/ubuntu kinetic-security InRelease                                                                                                                                           
0.361 Ign:2 http://archive.ubuntu.com/ubuntu kinetic InRelease                                                                                                                                                     
0.421 Ign:3 http://archive.ubuntu.com/ubuntu kinetic-updates InRelease                                                                                                                                             
0.426 Err:4 http://security.ubuntu.com/ubuntu kinetic-security Release
0.426   404  Not Found [IP: 185.125.190.39 80]
0.483 Ign:5 http://archive.ubuntu.com/ubuntu kinetic-backports InRelease
0.553 Err:6 http://archive.ubuntu.com/ubuntu kinetic Release
0.553   404  Not Found [IP: 185.125.190.39 80]
0.612 Err:7 http://archive.ubuntu.com/ubuntu kinetic-updates Release
0.612   404  Not Found [IP: 185.125.190.39 80]
0.672 Err:8 http://archive.ubuntu.com/ubuntu kinetic-backports Release
0.672   404  Not Found [IP: 185.125.190.39 80]
0.674 Reading package lists...
0.680 E: The repository 'http://security.ubuntu.com/ubuntu kinetic-security Release' does not have a Release file.
0.680 E: The repository 'http://archive.ubuntu.com/ubuntu kinetic Release' does not have a Release file.
0.680 E: The repository 'http://archive.ubuntu.com/ubuntu kinetic-updates Release' does not have a Release file.
0.680 E: The repository 'http://archive.ubuntu.com/ubuntu kinetic-backports Release' does not have a Release file.
------
Dockerfile:5
--------------------
   4 |     
   5 | >>> RUN apt-get update && apt-get install -y \
   6 | >>>     git \
   7 | >>>     libboost-dev \
   8 | >>>     libboost-program-options-dev \
   9 | >>>     libssl-dev \
  10 | >>>     cmake \
  11 | >>>     build-essential \
  12 | >>>     pkg-config \
  13 | >>>     libxml2-dev \
  14 | >>>     libspdlog-dev \
  15 | >>>     ninja-build \
  16 | >>>     capnproto \
  17 | >>>     libcapnp-dev \
  18 | >>>     python3-dev \
  19 | >>>     python3-pip \
  20 | >>>     python3-venv
  21 |     
--------------------
ERROR: failed to solve: process "/bin/bash -c apt-get update && apt-get install -y     git     libboost-dev     libboost-program-options-dev     libssl-dev     cmake     build-essential     pkg-config     libxml2-dev     libspdlog-dev     ninja-build     capnproto     libcapnp-dev     python3-dev     python3-pip     python3-venv" did not complete successfully: exit code: 100
(base) kripner@lathander:~/Projects/external/UDA/docker$ (base) kripner@lathander:~/Projects/external/UDA/docker$ docker build - < client.ubuntu.22.10
[+] Building 2.0s (6/12)                                                                                                                                                                            docker:default
 => [internal] load .dockerignore                                                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                                               0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                          0.0s
 => => transferring dockerfile: 1.03kB                                                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/library/ubuntu:22.10                                                                                                                                               1.3s
 => CACHED [1/8] FROM docker.io/library/ubuntu:22.10@sha256:e322f4808315c387868a9135beeb11435b5b83130a8599fd7d0014452c34f489                                                                                  0.0s
 => [internal] load build context                                                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                                               0.0s
 => ERROR [2/8] RUN apt-get update && apt-get install -y     git     libboost-dev     libboost-program-options-dev     libssl-dev     cmake     build-essential     pkg-config     libxml2-dev     libspdlog  0.7s
------                                                                                                                                                                                                              
 > [2/8] RUN apt-get update && apt-get install -y     git     libboost-dev     libboost-program-options-dev     libssl-dev     cmake     build-essential     pkg-config     libxml2-dev     libspdlog-dev     ninja-build     capnproto     libcapnp-dev     python3-dev     python3-pip     python3-venv:                                                                                                                             
0.361 Ign:1 http://security.ubuntu.com/ubuntu kinetic-security InRelease                                                                                                                                            
0.361 Ign:2 http://archive.ubuntu.com/ubuntu kinetic InRelease                                                                                                                                                      
0.421 Ign:3 http://archive.ubuntu.com/ubuntu kinetic-updates InRelease                                                                                                                                              
0.426 Err:4 http://security.ubuntu.com/ubuntu kinetic-security Release
0.426   404  Not Found [IP: 185.125.190.39 80]
0.483 Ign:5 http://archive.ubuntu.com/ubuntu kinetic-backports InRelease
0.553 Err:6 http://archive.ubuntu.com/ubuntu kinetic Release
0.553   404  Not Found [IP: 185.125.190.39 80]
0.612 Err:7 http://archive.ubuntu.com/ubuntu kinetic-updates Release
0.612   404  Not Found [IP: 185.125.190.39 80]
0.672 Err:8 http://archive.ubuntu.com/ubuntu kinetic-backports Release
0.672   404  Not Found [IP: 185.125.190.39 80]
0.674 Reading package lists...
0.680 E: The repository 'http://security.ubuntu.com/ubuntu kinetic-security Release' does not have a Release file.
0.680 E: The repository 'http://archive.ubuntu.com/ubuntu kinetic Release' does not have a Release file.
2-dev     libspdlog-dev     ninja-build     capnproto     libcapnp-dev     python3-dev     python3-pip     python3-venv" did not complete successfully: exit code: 100    build-essential     pkg-config     libxml

centOS one failed with cmake:

(base) kripner@xxx:~/xxx/UDA/docker$ docker build - < client.centos.8
[+] Building 435.1s (12/15)                                                                                                                                                                         docker:default
 => [internal] load .dockerignore                                                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                                               0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                          0.0s
 => => transferring dockerfile: 2.19kB                                                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/library/centos:8                                                                                                                                                   2.3s
 => [ 1/11] FROM docker.io/library/centos:8@sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177                                                                                          20.0s
 => => resolve docker.io/library/centos:8@sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177                                                                                             0.0s
 => => sha256:5d0da3dc976460b72c77d94c8a1ad043720b0416bfc16c52c45d4847e53fadb6 2.14kB / 2.14kB                                                                                                                0.0s
 => => sha256:a1d0c75327776413fa0db9ed3adcdbadedc95a662eb1d360dad82bb913f8a1d1 83.52MB / 83.52MB                                                                                                             18.4s
 => => sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177 762B / 762B                                                                                                                    0.0s
 => => sha256:a1801b843b1bfaf77c501e7a6d3f709401a1e0c83863037fa3aab063a7fdb9dc 529B / 529B                                                                                                                    0.0s
 => => extracting sha256:a1d0c75327776413fa0db9ed3adcdbadedc95a662eb1d360dad82bb913f8a1d1                                                                                                                     1.5s
 => [internal] load build context                                                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                                               0.0s
 => [ 2/11] RUN sed -i 's/$releasever/$releasever-stream/g' /etc/yum.repos.d/CentOS-*                                                                                                                         0.3s
 => [ 3/11] RUN yum update -y --allowerasing &&     yum group install -y 'Development Tools' &&     yum install -y         git         wget         boost-devel         openssl-devel         cmake         314.7s
 => [ 4/11] RUN cd /tmp &&     wget https://github.com/fmtlib/fmt/archive/refs/tags/10.0.0.tar.gz &&     tar xzf 10.0.0.tar.gz &&     cd fmt-10.0.0 &&     cmake -Bbuild -H. -DCMAKE_BUILD_TYPE=Release -DC  31.3s 
 => [ 5/11] RUN cd /tmp &&     wget https://github.com/gabime/spdlog/archive/refs/tags/v1.11.0.tar.gz &&     tar xzf v1.11.0.tar.gz &&     cd spdlog-1.11.0 &&     cmake -Bbuild -H. -DCMAKE_BUILD_TYPE=Rele  9.4s 
 => [ 6/11] RUN cd /tmp &&     wget https://github.com/capnproto/capnproto/archive/refs/tags/v0.10.4.tar.gz &&     tar xzf v0.10.4.tar.gz &&     cd capnproto-0.10.4 &&     cmake -Bbuild -H. -DCMAKE_BUILD  56.9s 
 => [ 7/11] COPY . /uda                                                                                                                                                                                       0.0s 
 => ERROR [ 8/11] RUN cd /uda &&     cmake -B build     -DBUILD_SHARED_LIBS=ON     -DCMAKE_BUILD_TYPE=Release     -DSSLAUTHENTICATION=ON     -DCLIENT_ONLY=ON     -DENABLE_CAPNP=ON                           0.3s 
------                                                                                                                                                                                                             
 > [ 8/11] RUN cd /uda &&     cmake -B build     -DBUILD_SHARED_LIBS=ON     -DCMAKE_BUILD_TYPE=Release     -DSSLAUTHENTICATION=ON     -DCLIENT_ONLY=ON     -DENABLE_CAPNP=ON:                                      
0.263 CMake Error: The source directory "/uda" does not appear to contain CMakeLists.txt.                                                                                                                          
0.263 Specify --help for usage, or press the help button on the CMake GUI.                                                                                                                                         
------
Dockerfile:47
--------------------
  46 |     
  47 | >>> RUN cd /uda && \
  48 | >>>     cmake -B build \
  49 | >>>     -DBUILD_SHARED_LIBS=ON \
  50 | >>>     -DCMAKE_BUILD_TYPE=Release \
  51 | >>>     -DSSLAUTHENTICATION=ON \
  52 | >>>     -DCLIENT_ONLY=ON \
  53 | >>>     -DENABLE_CAPNP=ON
  54 |     
--------------------
ERROR: failed to solve: process "/bin/bash -c cd /uda &&     cmake -B build     -DBUILD_SHARED_LIBS=ON     -DCMAKE_BUILD_TYPE=Release     -DSSLAUTHENTICATION=ON     -DCLIENT_ONLY=ON     -DENABLE_CAPNP=ON" did not complete successfully: exit code: 1
jholloc commented 10 months ago

Where are you building the docker images from? It's not ideal but currently the docker images copy the source from your working directory's parent into the image before building:

COPY .. /uda

So you need to run the docker build command in the /docker directory. I'll look to replace this copy with a git clone in the next release so the images can be built anywhere.

kripnerl commented 10 months ago

Hi I run it with

kripner@xxx:~/xxx/UDA/docker$ docker build - < client.centos.8
(base) kripner@xxx:~/xxx/UDA/docker$ docker build - < client.ubuntu.22.10

However, we found how to run it: The ubuntu docker is broken - it requires ubuntu 22.04 (LTS) to install packages with apt. The proper running command is:

kripner@lathander:xxx/UDA$ docker build -f docker/client.ubuntu.22.04 .