GoogleContainerTools / GoogleContainerTools/distroless

[node][proposal] Add node to PATH

Open
#1,773 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
23.1k
Forks
1.4k
Avg merge
10h 8m
Merged PRs (30d)
26

Description

Currently we need to add "magic", absolute path to node binary in health cmd:
```Dockerfile
# myapp
CMD [ "./server.js" ]
HEALTHCHECK CMD [ "/nodejs/bin/node", "./healthcheck.js" ]
```
If we were to enrich the environment variable PATH it would be unnecessary:

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

What do you think about this improvement?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.