-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make docker run
with default config with not param
#248
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 248 Deploy Test Success
build/package/entrypoint.sh
Outdated
|
||
if [ "$(echo $1 | head -c 1)" != "-" ] ; then | ||
if [ $# != 0 ] ; then | ||
exec "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would allow running any command, it's fine but not good.
this image does not like other base images - such as alpine, ubuntu. this image is dedicated to easegress.
So, it's better for people can easy add the easegress parameters in the command line instead ask user to run something like this:
docker run easegress /opt/easegress/bin/easegress-serve foo bar
the better way should be:
docker run easegress easegress foo bar
Please check the Docker official best practice - ENTRYPOINT , and take a look at the postgres example.
Through we added the PATH, but whether we should check if the first parameter is easegress?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The original docker image file can let user run default configuration with
docker run easegress --
but it supports adding param in this format
dock run easegress --foo --bar
- My first consideration is to support running in
docker run easegress
with default configuration. And yes,docker run easegress /opt/easegress/bin/easegress-serve foo bar
is a bit weird, let me align with other popular product's image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@haoel
Update it according to the the docker best practice guide.
Now we support
docker run -it megaease/easegress:latest easegress-sever --debug // with whatever command u want
docker run -it megaease/easegress:latest --debug // only with easegress parameters
docker run -it megaease/easegress:latest // with all default parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 248 Deploy Test Success
build/package/Dockerfile
Outdated
@@ -20,4 +20,6 @@ RUN apk --no-cache add tini tzdata && \ | |||
|
|||
ENV PATH /opt/easegress/bin:$PATH | |||
|
|||
ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"] | |||
ENTRYPOINT ["/sbin/tini", "--" ,"/entrypoint.sh"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose to adjust the place of ,
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's updated mistakenly, let me fix it.
build/package/Dockerfile.goreleaser
Outdated
@@ -10,4 +10,6 @@ RUN apk --no-cache add tini tzdata && \ | |||
|
|||
ENV PATH /opt/easegress/bin:$PATH | |||
|
|||
ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"] | |||
ENTRYPOINT ["/sbin/tini", "--" ,"/entrypoint.sh"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 248 Deploy Test Success
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
For closing #238
support running easegress image with
docker run -it megaease/easegress:latest easegress-sever --debug // with whatever command u want docker run -it megaease/easegress:latest --debug // only with easegress parameters docker run -it megaease/easegress:latest // with all default parameters