Skip to content

Commit 287d5ab

Browse files
authored
feat: re-work Docker image so that Frequency CLI options may be passed when instantiating a container (#52)
This PR re-works the Docker container built by this repo so that additional CLI options can be passed to the Frequency node simply by adding them to the `CMD` (`command: ` in `docker-compose.yaml`). Closes: #51 Solution ======== * Removed `CMD` from Docker image; moved existing `CMD` & appended to `ENTRYPOINT` instead * Allowed for CLI parameter pass-through in `deploy_schemas_to_node.sh` script Double Checks: --------------- - [] Did you update the changelog? - [] Do you have good documentation on exported methods? Steps to Verify: ---------------- 1. Build a new Docker image from this repo 2. Start up a container & add CLI parameters using the CMD property 3. Inspect the running container & see if the parameters were honored
1 parent 407c986 commit 287d5ab

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,4 @@ VOLUME ["/data"]
4848
HEALTHCHECK --start-period=15s \
4949
CMD curl --silent --fail -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "schemas_getBySchemaId", "params": [11]}' http://localhost:9944/ | grep -qv '{"jsonrpc":"2.0","result":null,"id":1}' || exit 1
5050

51-
ENTRYPOINT ["/tini", "--"]
52-
53-
# Params which can be overriden from CLI
54-
CMD ["/bin/bash", "frequency/deploy_schemas_to_node.sh"]
51+
ENTRYPOINT ["/tini", "--", "frequency/deploy_schemas_to_node.sh"]

scripts/deploy_schemas_to_node.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ldd --version
88
whoami
99

1010
# Base image start script
11-
/frequency/frequency-start.sh &
11+
/frequency/frequency-start.sh $* &
1212

1313
cd frequency/schemas
1414
npm run deploy

0 commit comments

Comments
 (0)