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

enable docker run microsoft/iis cmd #9

Closed
wants to merge 1 commit into from
Closed

enable docker run microsoft/iis cmd #9

wants to merge 1 commit into from

Conversation

tg123
Copy link
Member

@tg123 tg123 commented Nov 11, 2016

enable
docker run microsoft/iis cmd

@shirhatti
Copy link
Contributor

I'm looking at Apache and Nginx as well and does seem to be commonplace to specify the "entrypoint" of a base image using the CMD directive making it easy to overwrite.

@MichaelSimons @glennc Thoughts on making this change?

@StefanScherer
Copy link

As I've seen the nginx, httpd and mongo official Dockerfiles, I would also prefer to use CMD here.
@friism any suggestions how to share best practices on both Linux and Windows?

@MichaelSimons
Copy link
Member

What is the version scheme for this image and the potential impact this change may have on existing users?

@shirhatti
Copy link
Contributor

Versioning scheme for this repo is microsoft/iis:[os-flavor]-[version]

Seems like a low impact change, however the ASP.NET images depend on this image they will be affected as well.

@glennc
Copy link
Collaborator

glennc commented Nov 15, 2016

Are there ever any arguments you would want to pass to ServiceMonitor?

@shirhatti
Copy link
Contributor

ServiceMonitor is generic enough to work with any service (that listens to Ctrl+C), but there's really no reason monitor any other service in the IIS/ASP.NET images.

@shhsu
Copy link

shhsu commented Nov 18, 2016

Actually mongo uses ENTRYPOINT instead of CMD. https://github.com/docker-library/mongo/blob/b37a4891feffeafb77febd2833d96b59cf28d6a8/3.0/Dockerfile#L51 There doesn't seem to be a fixed consensus. This dockerfile was authored with the idea that user shouldn't need to modify the entry point. @tg123, could you provide some more detailed description of your motivation for the change?

@friism
Copy link

friism commented Nov 18, 2016

Can't you just run docker run -ti --entrypoint cmd microsoft/iis? cc @PatrickLang

@shirhatti
Copy link
Contributor

Can't you just run docker run -ti --entrypoint cmd microsoft/iis

Yes. This currently works

@tg123
Copy link
Member Author

tg123 commented Nov 18, 2016

Hi @shufan

I checked the Dockerfile you referred, it uses CMD not ENTRYPOINT.

COPY docker-entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

EXPOSE 27017

CMD ["mongod"]

As I know most docker images use entrypoint to do some init works that must be called when container starts.
The "ServiceMonitor" here works like a daemon on Linux, as a result, I prefer to use it in CMD.

And any detailed reason why user should not change the entrypoint?

@shhsu
Copy link

shhsu commented Nov 18, 2016

Technically docker-mongo uses ENTRYPOINT and CMD is only there to provide the input argument.

It's true that ServiceMonitor serves like a daemon currently therefore CMD would make sense. However I know that there's some work going on for w3svc to be called directly. In that case ENTRYPOINT makes sense over CMD. So this is another reason that ENTRYPOINT was chosen.

@shirhatti should have more context on this

@shirhatti shirhatti closed this May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants