openresty / openresty/docker-openresty
Use ENTRYPOINT + CMD for easier configurability
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 1k
- Forks
- 536
- Avg merge
- 1d 32m
- Merged PRs (30d)
- 1
Description
Now there is CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"], but it could be
ENTRYPOINT ["/usr/local/openresty/bin/openresty"]
CMD ["-g", "daemon off;"]
And if I want to override the -g argument, I could do just
docker run openresty/openresty:alpine -g "daemon off; env MY_ENV_FOR_LUA;"
Without having to be concerned where the openresty binary resides.
How to verify functionality
Dockerfile
FROM openresty/openresty:alpine
ENTRYPOINT ["/usr/local/openresty/bin/openresty"]
CMD ["-g", "daemon off;"]
Build it
docker build -t test .
Run it
docker run --rm -it -e FOO=bar test -g 'daemon off; env FOO;'
Exec into and see process with top
{openresty} nginx: master process /usr/local/openresty/bin/openresty -g daemon off; env FOO;
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the repository Dockerfile that currently defines CMD, then compare its image configuration with the ENTRYPOINT and CMD shown in the issue. Build the image and run the provided docker commands to verify that overriding the -g argument works and that the OpenResty process starts with the supplied environment expression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100