Hi David
When I start a docker container based on the image that is created shortly
before the mvn command fails, it is resolvable.
I can do : apt update
This basically means that the outside world is reachable

When I install wget the following succeeds without any issue:

wget
https://repo.maven.apache.org/maven2/org/apache/flink/flink-table-api-java/1.13.1/flink-table-api-java-1.13.1.pom
--2021-12-21 10:06:37--
https://repo.maven.apache.org/maven2/org/apache/flink/flink-table-api-java/1.13.1/flink-table-api-java-1.13.1.pom
Resolving www-proxy...... (www-proxy......)... 11.9.6.2
Connecting to www-proxy.............   ... connected.
Proxy request sent, awaiting response... 200 OK
Length: 5394 (5.3K) [text/xml]
Saving to: ‘flink-table-api-java-1.13.1.pom’

flink-table-api-java-1.13.1.pom
 
100%[=====================================================================================================================================>]
  5.27K  --.-KB/s    in 0.001s

2021-12-21 10:06:39 (4.42 MB/s) - ‘flink-table-api-java-1.13.1.pom’
saved [5394/5394]

Only setting /root/.m2/settings.xml correctly helps
And that is what I don't understand as the proxy configuration will not be
the same for everyone.

Regards Hans-Peter




Op di 21 dec. 2021 om 09:51 schreef David Morávek <d...@apache.org>:

> Hello Hans,
>
> it's DNS ;) You need to make sure, that "repo.maven.apache.org" can be
> resolved from your docker container (you can use tools such as host, dig,
> nslookup to verify that). This is may be tricky to debug, unless you're
> familiar with networking. A good place to start might be checking the
> /etc/resolv.conf for details about the DNS server being used.
>
> Best,
> D.
>
> On Mon, Dec 20, 2021 at 3:39 PM HG <hanspeter.sl...@gmail.com> wrote:
>
>> Hello
>> I am trying to the flink-playground examples.
>> The docker-compose build fails on the mvn clean install command .
>>
>> I am behind a proxy.
>> To diagnose this I started a container based on the already created image
>>   docker run -it  --name my-maven-project -v "$(pwd)":/usr/src/mymaven -w
>> /usr/src/mymaven b92c6af9fde8 /bin/bash
>> Adding packages with apt goes fine
>> I added the proxy names with their  ip addresses to /etc/hosts, added the
>> proxies to .m2/settings.xml
>>
>> After that it worked .
>>
>> But why does it not work without manual intervention?
>>
>> Regards Hans-Peter
>>
>

Reply via email to