Raspberry Pi (docker) key generation fails

hi on my raspberry i pulled the image with docker pull anatomicjc/passbolt:latest-ce-multiarch

but when start it:

docker run --name passbolt \
             -p 80:80 \
             -p 443:443 \
             -e DATASOURCES_DEFAULT_HOST=192.168.1.2 \
             -e DATASOURCES_DEFAULT_PASSWORD=xxxxxxxxxxxxxx\
             -e DATASOURCES_DEFAULT_USERNAME=passbolt \
             -e DATASOURCES_DEFAULT_DATABASE=secrets \
             -e APP_FULL_BASE_URL=https://xxxxxxxxx.org \
             anatomicjc/passbolt:latest-ce-multiarch

the containar exit with this error

 gpg: keybox '/var/lib/passbolt/.gnupg/pubring.kbx' created
 gpg: agent_genkey failed: End of file
 gpg: key generation failed: End of file

i think i wrong sometings

Hi @byte4geek :wave: and welcome to passbolt community forum :people_holding_hands:

Which OS are you running and which Raspberry PI model are you using?

Can you give us the output of the following commands:

# Will display the CPU architecture inside your container
docker run -it --rm anatomicjc/passbolt:latest-ce-multiarch uname -m
# Will display OS information
cat /etc/os-release
# Will display docker informations
docker info

Thank you for your answers, it will give us a clearer picture on your problem.

Best regards,

Thanks for reply, the informations requested

root@rasp:~# docker run -it --rm anatomicjc/passbolt:latest-ce-multiarch uname -m
armv7l

root@rasp:~# cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"


root@rasp:~# docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.16.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 16
 Server Version: 23.0.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 2456e983eb9e37e47538f59ea18f2043c9a73640
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 5.10.103-v7l+
 Operating System: Raspbian GNU/Linux 10 (buster)
 OSType: linux
 Architecture: armv7l
 CPUs: 4
 Total Memory: 3.749GiB
 Name: solarpi
 ID: SOZW:TFRC:QUOT:ISVH:RWG5:R5XN:MJDE:UB7L:2J2N:X4UC:2OXG:TG23
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory TCP limit support
WARNING: No oom kill disable support

Hum,

With armv7l arch, I assume you have a Raspberry version 4. Raspbian 10 is quite old and is running in 32 bits version if I am not wrong. You could have a 64bit OS with latest raspbian.
I am unfortunately unable to reproduce your issue :confused:
I used your command line and emulate the armv7l without issue, the GPG step worked:

$ docker run  --rm --platform linux/arm/v7 --name passbolt \
             -p 80:80 \
             -p 443:443 \
             -e DATASOURCES_DEFAULT_HOST=192.168.1.2 \
             -e DATASOURCES_DEFAULT_PASSWORD=xxxxxxxxxxxxxx\
             -e DATASOURCES_DEFAULT_USERNAME=passbolt \
             -e DATASOURCES_DEFAULT_DATABASE=secrets \
             -e APP_FULL_BASE_URL=https://xxxxxxxxx.org \
             anatomicjc/passbolt:latest-ce-multiarch

==================================================================================
  Your entropy pool is low. This situation could lead GnuPG to not
  be able to create the gpg serverkey so the container start process will hang
  until enough entropy is obtained.
  Please consider installing rng-tools and/or virtio-rng on your host as the
  preferred method to generate random numbers using a TRNG.
  If rngd (rng-tools) does not provide enough or fast enough randomness you could
  consider installing haveged as a helper to speed up this process.
  Using haveged as a replacement for rngd is not recommended. You can read more
  about this topic here: https://lwn.net/Articles/525459/
==================================================================================
gpg: keybox '/var/lib/passbolt/.gnupg/pubring.kbx' created
gpg: /var/lib/passbolt/.gnupg/trustdb.gpg: trustdb created
gpg: key 843DAA1496565988 marked as ultimately trusted
gpg: directory '/var/lib/passbolt/.gnupg/openpgp-revocs.d' created
gpg: revocation certificate stored as '/var/lib/passbolt/.gnupg/openpgp-revocs.d/2F2CF419C97B600237348A4B843DAA1496565988.rev'
gpg: key 843DAA1496565988: "Passbolt default user <passbolt@yourdomain.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
gpg: key 843DAA1496565988: "Passbolt default user <passbolt@yourdomain.com>" not changed
gpg: key 843DAA1496565988: secret key imported
gpg: Total number processed: 1
gpg:              unchanged: 1
gpg:       secret keys read: 1
gpg:  secret keys unchanged: 1
Generating a RSA private key
..........................................................................................................................++++
..++++
writing new private key to '/etc/ssl/certs/certificate.key'
-----
gpg: checking the trustdb
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
Installing passbolt

     ____                  __          ____
    / __ \____  _____ ____/ /_  ____  / / /_
   / /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/
  / ____/ /_/ (__  |__  ) /_/ / /_/ / / /
 /_/    \__,_/____/____/_.___/\____/_/\__/

Here is my docker version:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.16.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose
  scan: Docker Scan (Docker Inc.)
    Version:  v0.23.0
    Path:     /usr/libexec/docker/cli-plugins/docker-scan

Server:
 Containers: 3
  Running: 0
  Paused: 0
  Stopped: 3
 Images: 28
 Server Version: 23.0.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 2456e983eb9e37e47538f59ea18f2043c9a73640
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.19.0-31-generic
 Operating System: Ubuntu 22.10
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 38.89GiB
 Name: onyx
 ID: 9cea8064-6ce0-44e7-9a95-8c6d92ee967c
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: anatomicjc
 Registry: https://index.docker.io/v1/
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
1 Like

And the uname -m command:

$ docker run -it --rm --platform linux/arm/v7 anatomicjc/passbolt:latest-ce-multiarch uname -m
armv7l

this is

root@rasp:~# docker run -it --rm --platform linux/arm/v7 anatomicjc/passbolt:latest-ce-multiarch uname -m

armv7l
armv7l

Maybe you don’t have enough entropy on your raspberry ? Can you install haveged:

sudo apt install haveged

Then retry your docker command and see if gpg key generation works?

haveged installed and unfortunatly same erorr

for now i solved by installing passbolt docker on a debian amd64 on other machine