This Bash script is a versatile tool designed to simplify the management of Docker images. It allows users to pull, retag, and manage Docker images, and it is especially useful for users facing network restrictions, sanctions, or filternet issues. The script enables you to bypass such restrictions by specifying custom proxy servers or using a default proxy server.
To use this script, follow these steps for installation:
-
Download the Script:
- Download the Bash script named
docker-pull
from this repository.
- Download the Bash script named
-
Copy to a Directory in
PATH
:- Copy the downloaded script to a directory that is in your system's
PATH
. Common choices include:/usr/local/bin/
(system-wide)~/.local/bin/
(user-specific)
Example (assuming you are in the directory containing the script):
sudo cp docker-pull /usr/local/bin/
- Copy the downloaded script to a directory that is in your system's
Note: Use sudo
if you're copying to a system-wide directory.
- Provide Execute Permission:
-
Ensure that the script has execute permissions. You can do this by running:
chmod u+x /usr/local/bin/docker-pull
Once you've installed the script, you can use it to manage Docker images with the following syntax:
docker-pull <image_name> [proxy_server]
Basic Usage:
<image_name>
: The name of the Docker image you want to retrieve and manage.
Example:
docker-pull nginx:latest
This command pulls the Docker image my_image using the default proxy server "docker.iranrepo.ir," retags it as my_image, and removes the proxy image. It is suitable for standard usage without specifying a custom proxy server.
Custom Proxy Server Usage:
<image_name>
: The name of the Docker image you want to retrieve and manage.[proxy_server]
: The custom Docker proxy server URL.
Example:
docker-pull nginx:latest mycustomproxy.example.com
This script is licensed under the MIT License. You are free to use, modify, and distribute it as per the terms of the license.
Happy Docker Image ByPasser!