I'm trying to take my first steps with dagger by getting my application's unit tests to run via dagger. Part of this is having a MySQL container running for the unit tests to execute against.
I have a mysql container defined like this (using the python sdk):
@function
def mysql(self) -> dagger.Container:
"""Returns a container that runs a MySQL service"""
return (
dag.container()
.from_("mysql:5.7")
.with_env_variable("MYSQL_DATABASE", DB_NAME)
.with_env_variable("MYSQL_USER", DB_USER)
.with_env_variable("MYSQL_PASSWORD", DB_PASSWORD)
.with_exposed_port(3306)
.as_service()
)
And for some reason I'm getting the following error:
✘ Container.from(address: "mysql:5.7"): Container! 0.8s
! failed to resolve image docker.io/library/mysql:5.7: failed to resolve source metadata for docker.io/library/mysql:5.7: no match for platform in manifest: not found
✘ resolving docker.io/library/mysql:5.7 0.8s
! no match for platform in manifest: not found
✔ HTTP GET 0.4s
✔ remotes.docker.resolver.HTTPRequest 0.4s
I think the pertinent part is "no match for platform in manifest: not found" but I have no idea what this means :/ I'm on an M1 Mac, if that has any bearing on things... but I'm successfully running mysql in docker (via docker for mac and docker compose) without any issues right now so I'm not sure why dagger would be having issues with it...
Appreciate any insights that people might have.