[Bug]: MySQL Testcontainer can't chown /etc/mysql/conf.d folder inside rootless docker container

Aberta
#9,053 5 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
28/100
Tipo de issue
Bug
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
docker, java, mysql

Direção de pesquisa

Reproduza a falha com Ubuntu 22.04, Docker 27.0.3 e o módulo MySQL na versão 1.19.8 e, em seguida, inspecione o comportamento de MySQLContainer em torno de /etc/mysql/conf.d. Compare a issue vinculada do Podman e verifique se a configuração rootless executa os testes locais sem o erro de lchown ou um travamento.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

type/bug
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

Linguagem predominante
Java
Estrelas
8.8k
Forks
2k
Merge médio
5d 21h
PRs com merge (30d)
15

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de testcontainers/testcontainers-java

Todas as issues de testcontainers/testcontainers-java

Issues semelhantes

Mais issues de Java

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.