FROM nvidia/cuda:12.4.0-base-ubuntu22.04
# Allow passing in your host UID/GID (defaults 1000:1000)
ARG UID=1000
ARG GID=1000
#webgui service port
ARG PORT=8018
--- SNIP ---
# Expose the port that ComfyUI will use (change if needed)
EXPOSE $PORT
ENTRYPOINT ["/entrypoint.sh"]
CMD ["python","/app/ComfyUI/main.py","--listen","0.0.0.0","--port", ${PORT}]
In the last line the argument port isn’t valorized and the command fail…
Did you use a long dockerfile having several FROM clause (i.e. a multi-stages Docker file). If so, you’ve to add ARG PORT again (but without the need to assign a default value), this after your FROM clause, before to use the variable.