testcontainers / testcontainers/testcontainers-java
[Bug]: MySQL Testcontainer can't chown /etc/mysql/conf.d folder inside rootless docker container
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Java
- Sterne
- 8.7k
- Forks
- 1.9k
- Ø Merge
- 2 T. 17 Std.
- Gemergte PRs (30 T.)
- 9
Beschreibung
Module
MySQL
Testcontainers version
1.19.8
Using the latest Testcontainers version?
Yes
Host OS
Ubuntu 22.04
Host Arch
x86_64 Amazon Workspace
Docker version
Docker version 27.0.3, build 7d4bcd8
What happened?
Getting the following error when trying to run local test cases in Ubuntu. This is the same issue reported with Podman here.
com.example.db-utils-testExecution error (InternalServerErrorException) at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder/execute (DefaultInvocationBuilder.java:247).
Status 500: {"message":"failed to Lchown \"/etc/mysql/conf.d\" for UID 1467898976, GID 1467800513: lchown /etc/mysql/conf.d: invalid argument"}
This issue is happening for us with Ubuntu 22.04 with Clojure and kaocha where we are using testcontainer for running tests locally that spins up MySQL. It however works with Gitlab pipeline. This is really blocker for us. The same setup works on a mac.
I have tried overriding the MySQLContainer from Clojure side using proxy as mentioned in the linked bug, but it is not working. I don't get any error at this time, but the tests get stuck. I am also not able trace any logs because I couldn't find a way to enable printing logs in kaocha.
Kindly requesting your input on how to solve this. Thanks.
org.testcontainers/mysql {:mvn/version "1.19.8"}
org.testcontainers/localstack {:mvn/version "1.19.8"}
org.testcontainers/testcontainers {:mvn/version "1.19.8"}
Relevant log output
No response
Additional Information
No response
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere den Fehler mit Ubuntu 22.04, Docker 27.0.3 und dem MySQL-Modul in Version 1.19.8 und untersuche anschließend das Verhalten von MySQLContainer im Zusammenhang mit /etc/mysql/conf.d. Vergleiche das verlinkte Podman-Issue und verifiziere, dass das rootless-Setup die lokalen Tests ohne den lchown-Fehler oder einen Hänger ausführt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- docker, java, mysql
- Bereich
- databases, devops, testing-qa
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 28/100