hyperledger / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
433 stars 277 forks source link

šŸ¦Ÿ [BUG] A local Docker build breaks #2877

Open 6r1d opened 1 year ago

6r1d commented 1 year ago

Recently, @baziorek was trying to run the normal CI, which is broken and has a related issue: #2874. I had recommended using a Dockerfile and Iroha-builder, but there are issues with this approach as well.

git clone --depth=1 https://github.com/baziorek/iroha.git -b configurable_max_past_created_time
cd iroha
docker build -t hyperledger/iroha:develop-build -f docker/develop/Dockerfile .

The successful build takes about one hour:

Successfully tagged hyperledger/iroha:develop-build
docker build -t hyperledger/iroha:release-build -f docker/release/Dockerfile .
Sending build context to Docker daemon  39.89MB
Step 1/9 : FROM ubuntu:20.04
 ---> 53df61775e88
Step 2/9 : COPY iroha.deb /tmp/iroha.deb
COPY failed: file not found in build context or excluded by .dockerignore: stat iroha.deb: file does not exist

Interestingly, an Iroha process doesn't seem to be running within a container:

āžœ  ~ docker ps
CONTAINER ID   IMAGE                             COMMAND                  CREATED          STATUS          PORTS                                                                                                                                         NAMES
126196c23234   hyperledger/iroha:develop-build   "/bin/bash"              15 seconds ago   Up 14 seconds   0.0.0.0:49161->20000/tcp, :::49161->20000/tcp, 0.0.0.0:49160->50051/tcp, :::49160->50051/tcp, 0.0.0.0:49159->55552/tcp, :::49159->55552/tcp   docker-node-1
d6be7e9b9aa3   postgres:9.5                      "docker-entrypoint.sā€¦"   15 seconds ago   Up 14 seconds   5432/tcp                                                                                                                                      docker-postgres-1
āžœ  ~ docker exec -it docker-node-1 bash
root@126196c23234:/opt/iroha# ls
CMakeLists.txt  CODE_OF_CONDUCT.md  CONTRIBUTING.rst  Doxyfile  LICENSE  MAINTAINERS.md  README.md  SECURITY.md  cmake  docker  docs  example  goSrc  housekeeping  iroha-cli  irohad  libs  patch  schema  scripts  shared_model  snap  sonar-project.properties  test  utils  vcpkg
root@126196c23234:/opt/iroha#
root@126196c23234:/opt/iroha# ps -ef
UID          PID    PPID  C STIME TTY          TIME CMD
root           1       0  0 09:57 pts/0    00:00:00 /bin/bash
root           9       0  0 09:58 pts/1    00:00:00 bash
root          18       9  0 09:59 pts/1    00:00:00 ps -ef
root@126196c23234:/opt/iroha# ps -A
    PID TTY          TIME CMD
      1 pts/0    00:00:00 bash
      9 pts/1    00:00:00 bash
     20 pts/1    00:00:00 ps
āžœ  ~ docker container top docker-node-1
UID                 PID                 PPID                C                   STIME               TTY                 TIME                CMD
root                99019               98998               0                   12:04               pts/0               00:00:00            /bin/bash
baziorek commented 1 year ago

IMO to solve the issue is to add in documentation or in github (e.g. here https://github.com/hyperledger/iroha/tree/main/docker/develop) information how images for dockerhub are being built: https://hub.docker.com/r/hyperledger/iroha

And it would be nice to find out what commands are in CI:
obraz e.g.: