Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

how to only proxy when docker pull image ?

Featured Replies

Hi, there.  for some personal reason, I need to proxy docker when pull image. 

 

I follow some guide like that:

Quote

 

"Configure Docker

To make Docker use the proxy, you will have to configure dockerd. One way to do this is to create the file /etc/systemd/system/docker.service.d/proxy.conf with the following content:

[Service] Environment="HTTP_PROXY=socks5://127.0.0.1:8080" Environment="HTTPS_PROXY=socks5://127.0.0.1:8080"

(You most likely do not even need the HTTP_PROXY line, but it also doesn’t hurt. ;-) )

Once this file is in place, you need to restart the Docker service:

systemctl daemon-reload systemctl restart docker" 

 

 

but I could not find this path on unraid . 

 

does anyone could tell me what the dcoker.service.d/proxy conf  or another way.

 

I did`t want to proxy the whole unraid system or other services 

 

thanks 

  • Community Expert

You could try to set the DOCKER_OPTS variable in the docker.cfg in config/docker.cfg

 

Quote

DOCKER_OPTS=" -e "HTTP_PROXY=http://ip:port" -e "HTTPS_PROXY=http://ip:port""

But i have no clue if that will work.

Edited by Mainfrezzer

  • Author
Just now, Mainfrezzer said:

You could try to set the DOCKER_OPTS variable in the docker.cfg in config/docker.cfg

 

But i have no clue if that will work.

thanks I`ll try later

  • 10 months later...
On 9/12/2023 at 5:05 PM, paysen said:

thanks I`ll try later

I have tried this, it seems not work, and it is strange that my image has proxy.

  • 4 months later...

Have you found a way to make Docker use a proxy?

  • Community Expert

Works with 6.12.14 and any Unraid Version with Docker-Version 23+

That in your GO file will do the trick
 

# -------------[Docker Proxy Setting]-------------
mkdir -p /etc/docker/
cat<<EOF>/etc/docker/daemon.json
{
  "proxies": {
    "http-proxy": "http://YOUR HTTP PROXY:PORT",
    "https-proxy": "http://YOUR HTTP PROXY:PORT"
  }
}
EOF
# -------------------------------------------------

 

4 hours ago, Mainfrezzer said:

Works with 6.12.14 and any Unraid Version with Docker-Version 23+

That in your GO file will do the trick
 

# -------------[Docker Proxy Setting]-------------
mkdir -p /etc/docker/
cat<<EOF>/etc/docker/daemon.json
{
  "proxies": {
    "http-proxy": "http://YOUR HTTP PROXY:PORT",
    "https-proxy": "http://YOUR HTTP PROXY:PORT"
  }
}
EOF
# -------------------------------------------------

 

Thank you very much, it has taken effect.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.