This topic explains how to configure a connection between LabKey Server and a Docker container. You can use this connection to:
- Go to (Admin) > Site > Admin Console.
- Under Premium Features click Docker Host Settings.
- Enable Docker Settings: select On.
- Docker Host: Enter the URI for your docker host.
- Docker Certification Path: Unless you are running in devmode AND using port 2375, you must enter a valid file system path to the Docker certificates. Required for TCP in production mode. Note that LabKey expects certificates with specific names to reside in this directory. The certificate file names should be:
- Container Port Range: In most cases, leave these values blank.
- User File Management: Select Docker Volume for a server running in production mode.
- Click Save and then Test Saved Host to check your connectivity.
If you're developing with the Docker module on an OSX host you will likely need to use the socat tool to setup a TCP listener.
To run the listener you first need to ensure socat is installed. After that, you run socat in the terminal specifying the
same port as you would like to use in your Docker Host TCP configuration. Example of running socat:
socat TCP-LISTEN:2375,reuseaddr,fork,bind=127.0.0.1 UNIX-CLIENT:/var/run/docker.sock
http: TLS handshake error from <host-machine>: tls: first record does not look like a TLS handshake
Ensure that the certificate file names in Docker Certification Path
match exactly those listed above.