Skip to content

How to expose mysql port while starting Mysql test container #26

Discussion options

You must be logged in to vote

Hi, below is the way we can do this:

container = Testcontainers::MysqlContainer.new(@image_name,
name: @name,
port_bindings: {"3306/tcp" => "3306"})

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Koumudini-Sambre
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #22 on August 25, 2023 20:02.