Skip to content
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

Merged
merged 4 commits into from
Oct 9, 2021
Merged

make docker run with default config with not param #248

merged 4 commits into from
Oct 9, 2021

Conversation

benja-wu
Copy link
Contributor

@benja-wu benja-wu commented Sep 10, 2021

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

@benja-wu benja-wu added the enhancement New feature or request label Sep 10, 2021
@benja-wu benja-wu added this to the v1.4.0 milestone Sep 10, 2021
@benja-wu benja-wu added this to In progress in Easegress Project via automation Sep 10, 2021
@benja-wu benja-wu linked an issue Sep 10, 2021 that may be closed by this pull request
Copy link

@megaeasex megaeasex left a 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

Easegress Project automation moved this from In progress to Reviewer approved Sep 10, 2021

if [ "$(echo $1 | head -c 1)" != "-" ] ; then
if [ $# != 0 ] ; then
exec "$@"
Copy link
Contributor

@haoel haoel Sep 11, 2021

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

@benja-wu benja-wu Sep 29, 2021

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

Easegress Project automation moved this from Reviewer approved to Review in progress Sep 11, 2021
build/package/Dockerfile Outdated Show resolved Hide resolved
Copy link

@megaeasex megaeasex left a 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

@@ -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"]
Copy link
Contributor

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 ,?

Copy link
Contributor Author

@benja-wu benja-wu Sep 29, 2021

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.

@@ -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"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

Copy link

@megaeasex megaeasex left a 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

Copy link
Contributor

@haoel haoel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Easegress Project automation moved this from Review in progress to Reviewer approved Oct 9, 2021
@haoel haoel merged commit e611523 into easegress-io:main Oct 9, 2021
Easegress Project automation moved this from Reviewer approved to Done Oct 9, 2021
@localvar localvar modified the milestones: v1.4.0, v1.3.0 Oct 13, 2021
@benja-wu benja-wu deleted the docker branch October 23, 2021 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

default docker command does nothing
5 participants