Skip to content

Expose mysqlx port #466

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

Merged
merged 1 commit into from
Aug 14, 2018
Merged

Conversation

gpinhey
Copy link
Contributor

@gpinhey gpinhey commented Aug 1, 2018

The mysql v8 x-plugin listens on port 33060 by default, so this port should be marked as exposed.

@tianon
Copy link
Member

tianon commented Aug 2, 2018

The upstream-maintained image does EXPOSE this port as well, so I suppose I'm +1:

https://github.com/mysql/mysql-docker/blob/8e8a22d1f78c47ac6d80ba0636de04fa34116e55/8.0/Dockerfile#L32

@ltangvald is this sane for us to enable here too?

@ltangvald
Copy link
Collaborator

Yeah, I think this is good to have (though from what I understand, EXPOSE doesn't actually publish the port unless -p or similar is also used?)

@ltangvald
Copy link
Collaborator

One question, though: Does it make more sense to use EXPOSE 3306 33060 instead of having it on multiple lines? Is there a recommended standard for this?

@gpinhey
Copy link
Contributor Author

gpinhey commented Aug 7, 2018

Since the company-official mysql image puts both ports on one line, I'll change my PR to do the same.

It looks like EXPOSE in the Dockerfile is primarily used for inter-container communication where multiple containers exist on the same network, you don't need to EXPOSE a port if you'll be using docker run -p to explicitly bind a port from docker to host. However, in those inter-container communication environments (whether by docker-compose or, in my case, CircleCI) it helps to have the ports already open.

Plus, using EXPOSE is built-in documentation for what ports your container expects to use.

@gpinhey gpinhey force-pushed the expose-mysqlx-port branch from 081e71d to 774f3bd Compare August 7, 2018 20:58
@gpinhey
Copy link
Contributor Author

gpinhey commented Aug 13, 2018

@gpinhey gpinhey force-pushed the expose-mysqlx-port branch from 774f3bd to 9d1f625 Compare August 13, 2018 18:55
@tianon
Copy link
Member

tianon commented Aug 13, 2018

Does it make more sense to use EXPOSE 3306 33060 instead of having it on multiple lines? Is there a recommended standard for this?

It doesn't really make a difference (except for personal preference reading the Dockerfile); either way, Docker will collapse both together into a single metadata change, so they're functionally identical.

This LGTM either way.

@ltangvald
Copy link
Collaborator

+1

@ltangvald ltangvald merged commit b39f1e5 into docker-library:master Aug 14, 2018
tianon added a commit to infosiftr/stackbrew that referenced this pull request Aug 14, 2018
- `docker`: 18.06.1-ce-rc1
- `ghost`: 1.25.5
- `golang`: 1.11rc1
- `memcached`: 1.5.10
- `mysql`: expose `mysqlx` port (docker-library/mysql#466)
- `openjdk`: 8u181 (Debian)
- `postgres`: `11~beta3-1.pgdg90+2`
- `rocket.chat`: 0.68.4
- `wordpress`: docker-library/wordpress#324
tianon added a commit to infosiftr/stackbrew that referenced this pull request Aug 14, 2018
- `docker`: 18.06.1-ce-rc1
- `ghost`: 1.25.5
- `memcached`: 1.5.10
- `mysql`: expose `mysqlx` port (docker-library/mysql#466)
- `openjdk`: 8u181 (Debian)
- `postgres`: `11~beta3-1.pgdg90+2`
- `rocket.chat`: 0.68.4
- `wordpress`: docker-library/wordpress#324
@gpinhey gpinhey deleted the expose-mysqlx-port branch August 14, 2018 18:54
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.

3 participants