nithinp
Contributor
Contributor

How to set proxy to access internet on photon

Jump to solution

Hi

I have successfully deployed photon OVA templated on vSphere 5.5 setup, when I am trying to install docker using the command "docker run -d -p 80:80 vmwarecna/nginx" its says unable to reach internet. Since my setup is behind a proxy server, I have tried to set proxy in a traditional linux method, however I am still not able to reach internet.

Can you help me to find a way to set proxy ?

SO far I have tried to setup proxy by running below commands.

#export http_proxy=http://foo:bar@server-ip:port/

#export https_proxy=http://foo:bar@server-ip:port/

I am using below link to install docker.

https://github.com/vmware/photon/wiki/Running-Project-Photon-on-vSphere

0 Kudos
1 Solution
7 Replies
AnthonyChow
Hot Shot
Hot Shot

Try changing /etc/sysconfig/docker

There is a export http_proxy that you can uncomment.

0 Kudos
nithinp
Contributor
Contributor

I do not see any file/directory by name docker under /etc/sysconfig --  this is what I see under sysconfig

pastedImage_1.png

Version of Photon

pastedImage_0.png

0 Kudos
AnthonyChow
Hot Shot
Hot Shot

Did you have a chance to look at this link?

Control and configure Docker with systemd

"You can customize the Docker daemon options using override files as explained in the HTTP Proxy example below. The files located in /usr/lib/systemd/system or /lib/systemd/system contain the default options and should not be edited."

Hope this helps.

0 Kudos
nithinp
Contributor
Contributor

Thank You So much, this helped me 🙂

0 Kudos
AnthonyChow
Hot Shot
Hot Shot

Smiley Happy

0 Kudos
battybishop
Enthusiast
Enthusiast
Thanks, this helped me too 🙂
0 Kudos