@@ -26,3 +26,44 @@ need to download those binaries from the
2626[ loop] ( https://github.com/lightninglabs/loop/releases ) ,
2727[ pool] ( https://github.com/lightninglabs/pool/releases ) , and
2828[ faraday] ( https://github.com/lightninglabs/faraday/releases ) repos manually.
29+
30+ ## Building a docker image
31+
32+ There are two flavors of Dockerfiles available:
33+ - ` Dockerfile ` : Used for production builds. Checks out the source code from
34+ GitHub during build. The build argument ` --build-arg checkout=v0.x.x-alpha `
35+ can be used to specify what git tag or commit to check out before building.
36+ - ` dev.Dockerfile ` Used for development or testing builds. Uses the local code
37+ when building and allows local changes to be tested more easily.
38+
39+ ### Building a development docker image
40+
41+ Follow the instructions of the [ previous chapter] ( #compile-from-source-code ) to
42+ install all necessary dependencies.
43+
44+ Then, instead of ` make install ` run the following commands:
45+
46+ ``` shell script
47+ $ docker build -f dev.Dockerfile -t my-lit-dev-image .
48+ ```
49+
50+ If successful, you can then run the docker image with:
51+
52+ ``` shell script
53+ $ docker run -p 8443:8443 --rm --name litd my-lit-dev-image \
54+ --httpslisten=0.0.0.0:8443 \
55+ ... (your configuration flags here)
56+ ```
57+
58+ See the [ execution section in the main README] ( ../README.md#execution ) to find
59+ out what configuration flags to use.
60+
61+ ### Building a production docker image
62+
63+ To create a production build, you need to specify the git tag to create the
64+ image from. All local files will be ignored, everything is cloned and built from
65+ GitHub so you don't need to install any dependencies:
66+
67+ ``` shell script
68+ $ docker build -t lightninglabs/lightning-terminal --build-arg checkout=v0.3.2-alpha .
69+ ```
0 commit comments