cisco-ie / anx

Advanced NETCONF Explorer: Graphical Explorer for NETCONF / YANG and GNMI/GRPC Telemetry & Java NETCONF 1.1 client library
Apache License 2.0
183 stars 43 forks source link

Docker install fails when behind a proxy #21

Open jc-rode opened 4 years ago

jc-rode commented 4 years ago

The "docker build" was failing due to timeouts:

Downloading from vaadin-prereleases: http://maven.vaadin.com/vaadin-prereleases/com/vaadin/vaadin-bom/8.9.4/vaadin-bom-8.9.4.pom Downloading from opendaylight-mirror: https://nexus.opendaylight.org/content/repositories/public/com/vaadin/vaadin-bom/8.9.4/vaadin-bom-8.9.4.pom Downloading from vaadin-addons: http://maven.vaadin.com/vaadin-addons/com/vaadin/vaadin-bom/8.9.4/vaadin-bom-8.9.4.pom Downloading from central: https://repo.maven.apache.org/maven2/com/vaadin/vaadin-bom/8.9.4/vaadin-bom-8.9.4.pom [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Non-resolvable import POM: Could not transfer artifact com.vaadin:vaadin-bom:pom:8.9.4 from/to opendaylight-mirror (https://nexus.opendaylight.org/content/repositories/public/): Connect to nexus.opendaylight.org:443 [nexus.opendaylight.org/199.204.45.87] failed: Connection timed out (Connection timed out) @ line 36, column 16

Having the http_proxy and https_proxy env variables set in the container did not help...

I've added this line in the Dockerfile and it built successfully:

ENV MAVEN_OPTS="-Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort="

May the Dockerfile script could set MAVEN_OPTS automatically based on http_proxy and https_proxy... or document what needs to be done to make the install successful when behind a proxy.

Thanks.