Update local Docker images
To run a local OneCX instance, Docker images with the latest version are downloaded. Over time, these images become outdated, meaning that even if a newer version is available, the old version is still being used locally. Check versions with script check-images.sh.
The update-images.sh script is used to renew local Docker images. It can be run from the root directory of the onecx-local-env repository.
Here is the command to display the available flags:
./update-images.sh -h
|
To get an overview of the Docker images and their versions on your local machine, run the Docker command |
|
After successfully updating the images, it is recommended to clean up outdated Docker resources using the command
|
Available Flags
The script accepts several optional flags to customize its behavior. The available flags are:
- -c
-
Cleaned up orphaned images (e.g. if they have <none> in their name)
This option can be used in combination with -n or separately. If used without a name filter, all orphaned images will be removed. No additional confirmation is required.
- -h
-
Displays help information about the script and its available flags. If used then all other options are ignored.
- -n <text>
-
Name filter, update images which have <text> into image name
Examples
Update UI Images
The Docker which have ui in image name are pulled from remote registry.
./update-images.sh -n ui
Cleanup only
Started without any name filter will remove all orphaned images. No additional confirmation is required.
./update-images.sh -c
The deletion is only possible if the image is not in use. If so then stop the appropriate container first and try again.