It builds for me in the latest Ubuntu, without any modification of the build procedure: GitHub - Nitrokey/opensc-docker: Run OpenSC via Docker. See Home · Nitrokey/gnupg-docker Wiki · GitHub how to use the Docker container.
Edit: adding listing
Execution listing
sz@szpc-fedora-localdomain ~/w/o/opensc-docker> ./docker-run-command.sh
Running script with root privileges
=== Closing working pcscd on host
pcscd: no process found
scdaemon: no process found
root@szpc-fedora-localdomain:/app# pcscd
root@szpc-fedora-localdomain:/app# pkcs11-tool -L
Available slots:
Slot 0 (0x0): Nitrokey Nitrokey HSM (010000000000000000000000) 00 00
token label : UserPIN (SmartCard-HSM)
token manufacturer : www.CardContact.de
token model : PKCS#15 emulated
token flags : login required, rng, token initialized, PIN initialized
hardware version : 24.13
firmware version : 2.0
serial num : DENK0100398
pin min/max : 6/15
root@szpc-fedora-localdomain:/app# sc-hsm-tool
Using reader with a card: Nitrokey Nitrokey HSM (010000000000000000000000) 00 00
Version : 2.0
Config options :
User PIN reset with SO-PIN enabled
SO-PIN tries left : 15
User PIN tries left : 3