Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL/TLS certs inside Docker Desktop (Windows) doesn't seem to work #12

Open
e-tinus opened this issue Nov 14, 2019 · 0 comments
Open

SSL/TLS certs inside Docker Desktop (Windows) doesn't seem to work #12

e-tinus opened this issue Nov 14, 2019 · 0 comments

Comments

@e-tinus
Copy link

e-tinus commented Nov 14, 2019

I'm trying to setup a LearningLocker LRS via Docker Desktop on Windows. Everything is working fine when performing a docker-compose up -d on the provided docker-compse.yml with DOCKER_TAG=74018651d4b6013a6432eb3147a02fbd4804657b inside my .env-file. This allows me to have a working LRS via http://localhost/.

However, in order to connect to the LRS by means of the TinCan.NET Nuget packages, the package code is requiring SSL.

Following the instructions in the "Production usage" -> "SSL/TLS certs" section of this repository, I however can't seem to load the provided certificates into nginx, providing the following error: [emerg] 1#1: PEM_read_bio_X509_AUX("/root/ssl/fullchain.pem") failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line:Expecting: TRUSTED CERTIFICATE)

Because of Docker inside Windows, I needed to change the volumes code for the nginx container a bit (apparently, I also needed to declare the folder to be mounted):
volumes:
- "/xAPI pitch/LearningLocker/ssl:/root/ssl"
- "/xAPI pitch/LearningLocker/ssl/fullchain.pem:/root/ssl/fullchain.pem:ro"
- "/xAPI pitch/LearningLocker/ssl/privkey.pem:/root/ssl/privkey.pem:ro"

removing first entry (the folder mounting) provides the following docker error:
ERROR: for learninglocker_nginx_1 Cannot start service nginx: b'OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:449: container init caused \\"rootfs_linux.go:58: mounting \\\\\\"/xAPI pitch/LearningLocker/ssl/fullchain.pem\\\\\\" to rootfs \\\\\\"/var/lib/docker/overlay2/d98b862d8d475f199dbb09937b8cf9c317766f6b0b6a5c15ea2f841cacf0429d/merged\\\\\\" at \\\\\\"/var/lib/docker/overlay2/d98b862d8d475f199dbb09937b8cf9c317766f6b0b6a5c15ea2f841cacf0429d/merged/root/ssl/fullchain.pem\\\\\\" caused \\\\\\"not a directory\\\\\\"\\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type'

Am I doing this right, or am I missing something that could easily resolve this problem?

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant