Skip to content

Commit b4dc51b

Browse files
committed
docker: Use ENTRYPOINT instead of CMD
And update docs to configure lightning charge using command arguments
1 parent fc0a477 commit b4dc51b

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,5 @@ COPY --from=builder /opt/local /usr/local
8282
COPY --from=builder /opt/charged /opt/charged
8383
COPY --from=builder /usr/bin/tini /usr/bin/
8484

85-
CMD [ "tini", "-g", "--", "bin/docker-entrypoint.sh" ]
85+
ENTRYPOINT [ "tini", "-g", "--", "bin/docker-entrypoint.sh" ]
8686
EXPOSE 9112 9735

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ To deploy Lightning Charge with Docker, run these commands:
5454
```bash
5555
$ mkdir data # make sure to create the folder _before_ running docker
5656
$ docker run -it -u `id -u` -v `pwd`/data:/data -p 9735:9735 -p 9112:9112 \
57-
-e API_TOKEN=mySecretToken \
58-
shesek/lightning-charge
57+
shesek/lightning-charge --api-token mySecretToken
5958
```
6059

6160
This will start `bitcoind`, `lightningd` and `charged` and hook them up together.
@@ -66,7 +65,7 @@ Runs in `testnet` mode by default, set `NETWORK` to override.
6665
If you want to experiment in `regtest` mode and don't care about persisting data, this should do:
6766

6867
```bash
69-
$ docker run -it -e NETWORK=regtest -e API_TOKEN=mySecretToken -p 9112:9112 shesek/lightning-charge
68+
$ docker run -it -e NETWORK=regtest -p 9112:9112 shesek/lightning-charge --api-token mySecretToken
7069
```
7170

7271
To connect to an existing `lightningd` instance running on the same machine,

arm32v7.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ COPY --from=builder /opt/local /usr/local
3939
COPY --from=builder /opt/charged /opt/charged
4040
COPY --from=builder /usr/bin/tini /usr/bin/
4141

42-
CMD [ "tiny", "-g", "--", "bin/docker-entrypoint.sh" ]
42+
ENTRYPOINT [ "tiny", "-g", "--", "bin/docker-entrypoint.sh" ]
4343
EXPOSE 9112 9735

arm64v8.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ COPY --from=builder /opt/local /usr/local
3939
COPY --from=builder /opt/charged /opt/charged
4040
COPY --from=builder /usr/bin/tini /usr/bin/
4141

42-
CMD [ "tiny", "-g", "--", "bin/docker-entrypoint.sh" ]
42+
ENTRYPOINT [ "tiny", "-g", "--", "bin/docker-entrypoint.sh" ]
4343
EXPOSE 9112 9735

0 commit comments

Comments
 (0)