Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
library conflict with docker version #132
I've followed the instructions for running the cert-issuer from the docker container, and all is well until I actually invoke the 'cert-issuer' command, at which point I get an error (pasted below) that seems to suggest library incompatibilities, but I don't know enough about Python to fiddle with the dependencies. It seems like I need to either update connexion or install an earlier version of jsonschema. Any suggestions would be much appreciated.
bash-4.3# cert-issuer -c /etc/cert-issuer/conf.ini
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
@yancyribbens I followed the instructions in the cert-issuer README. So, for the docker container: git clone https://github.com/blockchain-certificates/cert-issuer.git && cd cert-issuer docker build -t bc/cert-issuer:1.0 . docker run -it bc/cert-issuer:1.0 bash And then to issue: issuer=`bitcoin-cli getnewaddress` sed -i.bak "s/<issuing-address>/$issuer/g" /etc/cert-issuer/conf.ini bitcoin-cli dumpprivkey $issuer > /etc/cert-issuer/pk_issuer.txt cp /cert-issuer/examples/data-testnet/unsigned_certificates/3bc1a96a-3501-46ed-8f75-49612bbac257.json /etc/cert-issuer/data/unsigned_certificates/ bitcoin-cli generate 101 bitcoin-cli sendtoaddress $issuer 5 cert-issuer -c /etc/cert-issuer/conf.ini At which point I get the error. I’ve been able to work around this by doing pretty much the same thing that the Docker file does for the merkletools/pysha library incompatibility — rewrite the offending dependency requirement to specify the newer library. Here is how the Docker file rewrites the merketools dependency (from https://github.com/blockchain-certificates/cert-issuer/blob/43af5ffff2b62e518778e8259f4a234167e769eb/Dockerfile#L32): sed -i.bak s/==1\.0b1/\>=1\.0\.2/g /usr/lib/python3.*/site-packages/merkletools-1.0.2-py3.*.egg-info/requires.txt Which is also described in this issue: #102 And so, for my case, I changed two files: 1. /usr/lib/python3.6/site-packages/connexion-2.2.0.dist-info/METADATA Changing line 20 from: Requires-Dist: jsonschema (<3,>=2.5.1) to: Requires-Dist: jsonschema (<3.0.2,>=2.5.1) 2. /usr/lib/python3.6/site-packages/openapi_spec_validator-0.2.6.dist-info/METADATA Changing line 19 from: Requires-Dist: jsonschema (<3) to: Requires-Dist: jsonschema (<3.2) I could create a sed for each, add them to the Docker file (like is done for the merkletools incompatibility) and submit as a PR, but my guess is that someone who knows more about Python could instead install the right version of jsonschema to satisfy the <3 requirements of connexion and openapi_spec_validator. And, I’ve no idea what other problems I might have created by changing the library requirements. All I know is that I can now issue a certificate on regtest. James…
On Mar 9, 2019, at 9:05 AM, Yancy Ribbens ***@***.***> wrote: hi @jchartrand. There are a few different ways to run cert-issuer from a docker container. Can you post what build command you used to build the container? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.