Skip to content

[Bug]: Doesn't work behind proxy since 1.20.0 (1.20.1 too) #9141

Description

@Piscenois

Module

Core

Testcontainers version

1.20.0

Using the latest Testcontainers version?

Yes

Host OS

Linux OL8

Host Arch

x86

Docker version

20.10.21

What happened?

When we upgrade the testcontainers version from 1.19.8 to 1.20.* our container (oracle free database) doesn't start anymore.

We usually use the docker image from Oracle container registry like this :

    private static final DockerImageName oracleFreeImage = DockerImageName
            .parse("container-registry.oracle.com/database/free:23.3.0.0")
            .asCompatibleSubstituteFor("gvenzl/oracle-free");

We tried without success to use the one from testcontainers :

    public static OracleContainer oracleContainer = new OracleContainer("gvenzl/oracle-free:23.4-slim-faststart")

The behaviour is always the same in Jenkins (maven 3.6.2) :

[ERROR]   MyTestClass.theTest » NoClassDefFound

It works perfectly on local machine (Windows 10, maven 3.6.2).

The Jenkins jobs runs on OL8 machine behind an enterprise proxy. The credentials are configured in

/etc/systemd/system/docker.service.d/http-proxy.conf

like that

[Service]
Environment="HTTP_PROXY=http://myuser:mypwd@proxy.mycompany.com:3128"
Environment="HTTPS_PROXY=http://myuser:mypwd@proxy.mycompany.com:3128"
Environment="NO_PROXY=localhost,127.0.0.0/8,mycompany.com,local"

This was working with 1.19.8 and 1.19.7.

I tried to force environment variables with .withEnv("HTTP_PROXY... It had no effect.

I guess this bug comes from a dependency but I didn't manage to find which incriminate.

I can help to run any workaround if you need me.

Regards

Relevant log output

unfortunately nothing

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions