<div dir="ltr">Hi,<div><br></div><div>this is really not an LXC specific question but I will try to give you some hints...</div><div><br></div><div>1) Test if you can actually resolve the proxy's name to an IP address from inside the container</div><div>2) Optionally test if you can reach the proxy on the specified port by using telnet, netcat, or some other "simple" tool</div><div>3) You must use export if you are not calling apt-get in the same line:</div><div> export http_proxy=<a href="http://proxy:3128">http://proxy:3128</a></div><div> export https_proxy=<a href="https://proxy:3128">https://proxy:3128</a></div><div>4) You probably want to make the proxy setting persistent by adding the following to /etc/apt/apt.conf.d/00proxy:</div> Acquire::http::Proxy "http://yourproxyaddress:proxyport";<div>5) For more information have a look here if you are using Ubuntu: </div><div> <a href="https://help.ubuntu.com/community/AptGet/Howto#Setting_up_apt-get_to_use_a_http-proxy">https://help.ubuntu.com/community/AptGet/Howto#Setting_up_apt-get_to_use_a_http-proxy</a></div><div><br></div><div>Kind regards,</div><div><br></div><div>BB</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 28, 2014 at 4:44 PM, Thouraya TH <span dir="ltr"><<a href="mailto:thouraya87@gmail.com" target="_blank">thouraya87@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<br><br>The host on which i work is a remote machine behind a proxy.<br>I have installed the jdk like that and it works well: (I access the remote machine via ssh)<br><br> http_proxy=<a href="http://proxy:3128" target="_blank">http://proxy:3128</a> && https_proxy=<a href="http://proxy:3128" target="_blank">http://proxy:3128</a><br> sudo apt-get install openjdk-7-jre-headless<br> :~# java<br> Usage: java [-options] class [args...]<br> (to execute a class)<br> or java [-options] -jar jarfile [args...]<br> (to execute a jar file)<br> where options include:<br> -d32 use a 32-bit data model if available<br> -d64 use a 64-bit data model if available<br> -server to select the "server" VM<br> <br>I'd like to install the JDK inside the container. I proceeded as follows: <br><br> ubuntu@worker:~$ http_proxy=<a href="http://proxy:3128" target="_blank">http://proxy:3128</a> && <br> https_proxy=<a href="http://proxy:3128" target="_blank">http://proxy:3128</a><br> ubuntu@worker:~$ sudo apt-get install openjdk-7-jre-headless<br> Reading package lists... Done<br> Building dependency tree <br> Reading state information... Done<br> The following extra packages will be installed:<br> ca-certificates ca-certificates-java fontconfig-config fonts-<br> dejavu-core<br> java-common libasyncns0 libavahi-client3 libavahi-common-data<br> libavahi-common3 libcups2 libflac8 libfontconfig1 libfreetype6 <br> libglib2.0-0<br> libglib2.0-data libjpeg-turbo8 libjpeg8 liblcms2-2 libnspr4 <br> libnss3<br> libnss3-nssdb libogg0 libpcsclite1 libpulse0 libsndfile1 <br> libvorbis0a<br> libvorbisenc2 libxau6 libxcb1 libxdmcp6 libxml2 openssl sgml-base<br> shared-mime-info tzdata-java xml-core<br> ............................<br> Err <a href="http://archive.ubuntu.com/ubuntu/" target="_blank">http://archive.ubuntu.com/ubuntu/</a> trusty/main java-common all <br> 0.51<br> Cannot initiate the connection to <a href="http://archive.ubuntu.com:80" target="_blank">archive.ubuntu.com:80</a> <br> (2001:67c:13......). - connect (101: Network is unreachable) <br> [IP: 2001:67c:13....... 80]<br><br><br><br>Have you an idea please ?<br><br>Thanks a lot.<br>Best Regards. <br></div>
<br>_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a><br></blockquote></div><br></div>