Missing lib directory after installing Python SDK on a Docker Container

I am working through creating a Docker container for the Python SDK.

I want to build this so that I can test the samples without needing to run them locally on my desktop.

Steps followed


apt-get -y update && apt-get -y install git

git clone https://github.com/openziti/ziti-sdk-py.git

cd /ziti-sdk-py/
python setup.py install

ZITI_IDENTITIES=/ziti-sdk-py/sample/tunneler-id.json
python3 h-ziti-p.py

The error I received is

OSError: /usr/local/lib/python3.8/site-packages/openziti-0.5.2-py3.8.egg/openziti/lib/libziti.so: cannot open shared object file: No such file or directory

I took a look in this directory and could not find the ‘lib’ directory that contains the file libziti.dylib

cd /usr/local/lib/python3.8/site-packages/openziti-0.5.2-py3.8.egg/openziti
root@3345db7c876b:/usr/local/lib/python3.8/site-packages/openziti-0.5.2-py3.8.egg/openziti#
ls
init.py main.py pycache _version.py context.py decor.py zitilib.py zitisock.py

Any tips on how to resolve this?

This was my mistake… as I was not using the right command to install the package

pip install openziti

What you will find, is that when you shut down the docker container, it will ‘forget’ any actions that have been done after the container has been started. This is a docker superpower - immutability. To achieve what you need, you will need to create a Dockerfile and then build the container. Then, once that is done, you will then have a container with all the ziti components installed, and then you bring your code.

There are plenty of sites on the web that will go through creating a container. Reach back out if you need assistance with this.

1 Like

@gooseleggs @dov

This week has been a very intensive learning experience… thx for all you help…