I am using tw 5.3.1 on node.js server via podman in rootless mode.
I have seral instance running, each with their own port. Each port needs two occurence in the Dockerfile: one for the export command and one for the command line launching tiddlywiki (the port=808x" argument).
I would like to use an ENV variable in the dockerfile to just have it written once and have zero risk of having two diffrent port numbers.
The following Dockerfile does not have the intended result. It lauches tw on port 8080 (the default) instead of 8088. However, if I write 8088
instead of $PORT
it effectively open tw on port 8088.
What is wrong? As far as I can say, my use of ENV var is correct.
# Dockerfile pour lancer le tiddlywiki gendat
# copiée et adaptée du modèle elasticdog/tiddlywiki disponible sur le docker hub
from node:20.6.0-alpine3.18
LABEL author="Jean-Pierre RIVIÈRE"
LABEL content="instance de nodejs avec le tiddliwki gendat"
env TIDDLYWIKI_VERSION=5.3.1
env WORKDIR=/usr/share/tiddlywiki/gendat
env PORT=8088
EXPOSE $PORT
WORKDIR $WORKDIR
VOLUME $WORKDIR
run apk update && apk add --no-cache tini
run npm install -g tiddlywiki@$TIDDLYWIKI_VERSION && npm install clean --force
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["tiddlywiki", "gendat", "--listen", "host=0.0.0.0", "port=$PORT"]