Lean Docker & Self-Hosted Deployment

GitHub

Lean Algorithmic Trading Engine by QuantConnect (Python, C#)

1. Pull Image (DOCKERHUB) docker pull QuantConnect/Lean:latest
2. Docker Run (1-Click Launch) docker run -d --name lean --restart always quantconnect/lean:latest
3. Podman Run podman run -d --name lean --restart always quantconnect/lean:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/quantconnect/lean:latest
5. ORAS Pull (OCI Artifact) oras pull quantconnect/lean:latest
Dockerfile
#
#   LEAN Docker Container 20200522
#   Cross platform deployment for multiple brokerages
#

# Use base system
FROM quantconnect/lean:foundation

MAINTAINER QuantConnect <[email protected]>

#Install debugpy and PyDevD for remote python debugging
RUN pip install --no-cache-dir ptvsd==4.3.2 debugpy~=1.6.7 pydevd-pycharm~=231.9225.15

# Install vsdbg for remote C# debugging in Visual Studio and Visual Studio Code
RUN wget https://aka.ms/getvsdbgsh -O - 2>/dev/null | /bin/sh /dev/stdin -v 17.10.20209.7 -l /root/vsdbg

COPY ./DataLibraries /Lean/Launcher/bin/Debug/
COPY ./Lean/Data/ /Lean/Data/
COPY ./Lean/Launcher/bin/Debug/ /Lean/Launcher/bin/Debug/
COPY ./Lean/Optimizer.Launcher/bin/Debug/ /Lean/Optimizer.Launcher/bin/Debug/
COPY ./Lean/Report/bin/Debug/ /Lean/Report/bin/Debug/
COPY ./Lean/DownloaderDataProvider/bin/Debug/ /Lean/DownloaderDataProvider/bin/Debug/

# Can override with '-w'
WORKDIR /Lean/Launcher/bin/Debug

ENTRYPOINT [ "dotnet", "QuantConnect.Lean.Launcher.dll" ]