distroless icon indicating copy to clipboard operation
distroless copied to clipboard

[node][proposal] Add node to PATH

Open sosoba opened this issue 9 months ago • 0 comments

Currently we need to add "magic", absolute path to node binary in health cmd:

# myapp
CMD [ "./server.js" ]
HEALTHCHECK CMD [ "/nodejs/bin/node", "./healthcheck.js" ]

If we were to enrich the environment variable PATH it would be unnecessary:

# distroless/nodejs
ENV PATH=/nodejs/bin/:$PATH
# myapp
CMD [ "./server.js" ]
HEALTHCHECK CMD [ "node", "./healthcheck.js" ]

What do you think about this improvement?

sosoba avatar Mar 24 '25 11:03 sosoba