I've set up docker-compose as a remote interpreter in pycharm using the instructions found here.
The docker-compose build works fine, but when trying to run a test using this interpreter I get the following error:
Testing started at 12:13 AM ...
docker-compose://[/home/melchoir55/gitrepos/python_rest/docker-compose.yml]:python_rest/python -u /opt/.pycharm_helpers/pycharm/_jb_unittest_runner.py --path /opt/project/tests
Traceback (most recent call last):
File "bin/docker-compose", line 6, in <module>
File "compose/cli/main.py", line 71, in main
File "compose/cli/main.py", line 124, in perform_command
File "compose/cli/command.py", line 38, in project_from_options
File "compose/cli/docker_client.py", line 84, in tls_config_from_options
File "site-packages/docker/tls.py", line 81, in __init__
docker.errors.TLSParameterError: Path to a certificate and key files must be provided through the client_config param. TLS configurations should map the Docker CLI client configurations. See https://docs.docker.com/engine/articles/https/ for API details.
[8964] Failed to execute script docker-compose
Process finished with exit code 255
I haven't done much to the system other than installing pycharm, docker, docker-compose, and adding my user to the docker group for permissions. Does anyone know what docker-compose is complaining about here via pycharm?
I did note that there seem to be some env vars which I don't have set related to these certificates, but it isn't clear to me what they should be set to, if I were to set them.
Update:
For reference I am running pycharm in Ubuntu within a virtualbox machine.
Turns out using the TCP socket
API URL was the way to go. I passed the unix socket to the TCP socket, and it worked.
This is the string i use in the Engine API URL unix:///var/run/docker.sock
.
Found the answer here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With