Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eddumelendez committed Mar 23, 2023
1 parent 0cdb2ed commit 82be5d8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions docs/modules/mysql.md
Expand Up @@ -16,14 +16,13 @@ go get github.com/testcontainers/testcontainers-go/modules/mysql

## Module Reference

The MySQL module exposes one entrypoint function to create the container, and this function receives three parameters:
The MySQL module exposes one entrypoint function to create the container, and this function receives two parameters:

```golang
func StartContainer(ctx context.Context, image string, opts ...Option) (*MySQLContainer, error) {
func StartContainer(ctx context.Context, opts ...Option) (*MySQLContainer, error) {
```
- `context.Context`, the Go context.
- `image`, the image to use for the container.
- `Option`, a variad argument for passing options.
## Container Options
Expand All @@ -34,6 +33,14 @@ When starting the MySQL container, you can pass options in a variadic way to con
You can find all the available configuration and environment variables for the MySQL Docker image on [Docker Hub](https://hub.docker.com/_/mysql).
### Set Image
By default, the image used is `mysql:8`. If you need to use a different image, you can use `WithImage` option.
<!--codeinclude-->
[Custom Image](../../modules/mysql/mysql_test.go) inside_block:withConfigFile
<!--/codeinclude-->
### Set username, password and database name
If you need to set a different database, and its credentials, you can use `WithUsername`, `WithPassword`, `WithDatabase`
Expand Down

0 comments on commit 82be5d8

Please sign in to comment.