1

I am trying to create a container with Docker that contains eclipse and some plugins. By now, I am trying to configure the proxy that I need for internet connexion and it works for the http but not for https. I use bash scripting and here is my file :

FROM ubuntu:18.04

RUN echo 'Acquire::http::Proxy "http://localhost:8080";' > /etc/apt/apt.conf.d/90curtin-aptproxy && \
    echo 'Acquire::https::Proxy "http://localhost:8080";' >> /etc/apt/apt.conf.d/90curtin-aptproxy && \
    sed 's/main$/main universe/' -i /etc/apt/sources.list && \
    apt-get update && \
    apt-get install -y wget openjdk-8-jdk libxext-dev libxrender-dev libxtst-dev libgtk2.0-0 libcanberra-gtk-module zip unzip gnupg2 curl && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* && \
    rm -rf /tmp/*

RUN groupadd --gid 1000 user && useradd --uid 1000 --gid 1000 --create-home --shell /bin/bash user

#ENV http_proxy=localhost:8080 https_proxy=localhost:8080

#ADD https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/neon/3/eclipse-java-neon-3-linux-gtk-x86_64.tar.gz&r=1 /tmp/eclipse-java-neon-3-linux-gtk-x86_64.tar.gz

#RUN tar -zxvf /tmp/eclipse-java-neon-3-linux-gtk-x86_64.tar.gz -C /opt/ && \
    #rm /tmp/eclipse-java-neon-3-linux-gtk-x86_64.tar.gz

ADD ./eclipse-java-neon-3-linux-gtk-x86_64.tar.gz /opt/

RUN echo "-Dhttp.proxyHost=localhost" >> /opt/eclipse/eclipse.ini && \
    echo "-Dhttp.proxyPort=8080" >> /opt/eclipse/eclipse.ini && \
    echo "-Dhttps.proxyHost=localhost" >> /opt/eclipse/eclipse.ini && \
    echo "-Dhttps.proxyPort=8080" >> /opt/eclipse/eclipse.ini && \
    echo "-Dhttp.nonProxyHosts=localhost|127.0.0.1" >> /opt/eclipse/eclipse.ini

COPY launch.sh /

RUN chmod u+x /launch.sh

ENTRYPOINT ["/launch.sh"]

When I run my eclipse and go into the settings, the proxy for http is set, but for the https nothing changed.

Could you help me ?

Thank you!

  • sofar export http_proxy=http://localhost:8080 and export https_proxy=http://localhost:8080 as the Protokoll is required usually – djdomi Aug 19 '19 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.