Opened 5 years ago
Closed 5 years ago
#48281 closed enhancement (fixed)
Expose port 3306 of MySQL container
Reported by: | ocean90 | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch |
Focuses: | Cc: |
Description
To allow accessing the container from external the port 3306 should get exposed. This is done by defining ports
in the config, see https://docs.docker.com/compose/compose-file/#ports.
To retrieve the host port you can then use docker-compose port mysql 3306
.
Attachments (2)
Change History (7)
#2
in reply to:
↑ 1
@
5 years ago
Replying to peterwilsoncc:
48281.2.diff accounts for users that may be exposing a database on the default port:
That’s why my patch only defines the container port to allow docker-compose to choose an ephemeral host port.
#3
@
5 years ago
+1 to this. I've tested 48281.2.diff and it works. Hopefully this gets committed soon.
This ticket was mentioned in Slack in #core by david.baumwald. View the logs.
5 years ago
Note: See
TracTickets for help on using
tickets.
48281.2.diff accounts for users that may be exposing a database on the default port:
8836