Skip to content

Commit

Permalink
Merge pull request #1038 from manuc66/feature/change-main-command-for…
Browse files Browse the repository at this point in the history
…-docker

enable other command than listen with docker, it should fix #1026
  • Loading branch information
manuc66 authored Nov 19, 2024
2 parents 5487faf + 06aaa64 commit a17e333
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN export SYS_ARCH=$(uname -m); \
&& untar ${S6_SRC_URL}/${S6_VERSION}/s6-overlay-noarch.tar.xz \
&& untar ${S6_SRC_URL}/${S6_VERSION}/s6-overlay-${S6_ARCH}.tar.xz \
echo "⬇️ Install shadow (for groupmod and usermod) and tzdata (for TZ env variable)" \
&& apk add --no-cache shadow tzdata
&& apk add --no-cache shadow tzdata curl

# add builded app
WORKDIR /app
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,14 @@ This will trigger a scan job as soon as the adf is loaded with paper

Do run `npx node-hp-scan-to adf-autoscan --help` to get command line usage help

You can also set the environment `MAIN_COMMAND` to `adf-autoscan` with docker

#### `clear-registrations`
This will clear all registered target on the device (useful for trial and error and debugging)
Do run `npx node-hp-scan-to clear-registrations --help` to get command line usage help

You can also set the environment `MAIN_COMMAND` to `clear-registrations` with docker

### Run with docker

Public Pre-built Docker image:
Expand Down
4 changes: 4 additions & 0 deletions root/app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ if [ ! -z "$CMDLINE" ]; then
ARGS="${ARGS} ${CMDLINE}"
fi

if [ ! -z "$MAIN_COMMAND" ]; then
ARGS="${MAIN_COMMAND} ${ARGS}"
fi

cd /app

echo "Starting"
Expand Down

0 comments on commit a17e333

Please sign in to comment.