Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Dockerfile deploy doesn't honor repository's exposed port for readiness check #328

Closed
n0n0x opened this issue Jun 17, 2016 · 4 comments
Closed

Comments

@n0n0x
Copy link
Contributor

n0n0x commented Jun 17, 2016

Sorry I put this here but I don't now which deis service handles this cases!

Came across this when using a Dockerfile like this:

FROM nginx
EXPOSE 80

by simply doing this, and pushing to deis, the readiness check points to port 443, this is because nginx image Dockerfile exposes both 80 an 443 and Deis seems to choose this instead of honoring the repository's dockerfile

How to reproduce:

  1. git init
  2. Create a Dockerfile
echo "FROM nginx
EXPOSE 80" > Dockerfile
  1. git add Dockerfile
  2. git commit -a -m Test
  3. deis create test-expose
  4. git push deis master
  5. kubectl get po --namespace=test-expose
  6. kubectl describe po --namespace=test-expose <podname> |grep Readiness

Result:

    Readiness:      tcp-socket :443 delay=5s timeout=5s period=5s #success=1 #failure=1

Expected result:

Deis should honor any exposed port from the repository's Docker file rather than the ones on the base image:

    Readiness:      tcp-socket :80 delay=5s timeout=5s period=5s #success=1 #failure=1
@bacongobbler
Copy link
Member

bacongobbler commented Jun 17, 2016

hey @n0n0x, at this time we only support dockerfile apps that expose only one port for these reasons. That being said, we are currently working on rewriting how health checks can be configured which you can follow along in deis/controller#603. That should hopefully alleviate this issue.

@n0n0x
Copy link
Contributor Author

n0n0x commented Jun 17, 2016

Oh, I misunderstood the documentation. Because I am actually explicitly telling to expose port 80 in my Dockerfile, but It exposes port 443 because of the inherited Dockerfile from the nginx image. I thought if I explicitly declare EXPOSE 80 on my Dockerfila that would override it.

@bacongobbler
Copy link
Member

Yeah that's what I thought too, but that is something built into docker. all child images inherit anything from parents, including exposed ports.

@n0n0x
Copy link
Contributor Author

n0n0x commented Jun 17, 2016

Awesome, thanks for the explanation! I am closing this.

@n0n0x n0n0x closed this as completed Jun 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants