https://github.com/ashcrow/dnf-plugin-container
Update containers like you update packages.
https://github.com/ashcrow/dnf-plugin-container
containers dnf dnf-plugin plugin system-containers tool update
Last synced: 2 months ago
JSON representation
Update containers like you update packages.
- Host: GitHub
- URL: https://github.com/ashcrow/dnf-plugin-container
- Owner: ashcrow
- License: other
- Created: 2017-10-17T21:25:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-18T13:33:53.000Z (over 7 years ago)
- Last Synced: 2025-02-13T18:35:00.837Z (4 months ago)
- Topics: containers, dnf, dnf-plugin, plugin, system-containers, tool, update
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dnf-plugin-container
Update containers like you update packages.**THIS IS A WORK IN PROGRESS**
In other words, this is a starting point for further work.## WIP Assumptions
- It may not work and possibly do weird things :-P
- Only tested with system containers so far
- The atomic commands libraries are available in the same site-packages that dnf uses
- Updates always update all containers to the latest version for the installed tag## Usage
**WARNING** This may break stuff!!
1. Create a path for plugins
2. Add ``pluginpath=$YOUR_NEW_PATH``
3. Place ``container.py``in $YOUR_NEW_PATH
4. Use ``dnf container``### Example
```
$ sudo atomic containers list --no-trunc
CONTAINER ID IMAGE COMMAND CREATED STATE BACKEND RUNTIME
aaaaz test:0.4.rc2 /usr/bin/run.sh 2017-10-18 09:17 failed ostree runc
$ sudo atomic images list
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE TYPE
test 0.4.rc2 2848e6699c97 2017-10-17 17:34 ostree
$ sudo dnf container check
Checking 1 local container(s) for updates
The following containers need updating:
aaaazTo update your containers use dnf containers update or, to update specific containers, the atomic command
Example: sudo atomic containers update aaaaz
$ sudo dnf container update -y
Checking 1 local container(s) for updates
The following containers need updating:
aaaazTo update your containers use dnf containers update or, to update specific containers, the atomic command
Example: sudo atomic containers update aaaaz
Pulling test:0.4.rc2 ...
Updating aaaaz ...
Extracting to /var/lib/containers/atomic/aaaaz.1
systemd-tmpfiles --remove /etc/tmpfiles.d/aaaaz.conf
systemctl daemon-reload
systemd-tmpfiles --create /etc/tmpfiles.d/aaaaz.conf
$ sudo atomic images list
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE TYPE
test 0.4.rc2 aa3d7accac3b 2017-10-18 09:18 ostree
$ sudo dnf container check
Checking 1 local container(s) for updates
No updates found
```### Commands
#### check
Reports on containers which have updates available.```
$ sudo dnf container check
Checking 1 local container(s) for updates
The following containers need updating:
aaaazTo update your containers use dnf containers update or, to update specific containers, the atomic command
Example: sudo atomic containers update aaaaz
```#### update
Updates all system containers to the latest image for the installed tag.```
$ sudo dnf container update -y
Checking 1 local container(s) for updates
The following containers need updating:
aaaazTo update your containers use dnf containers update or, to update specific containers, the atomic command
Example: sudo atomic containers update aaaaz
Pulling ...
Updating aaaaz ...
Extracting to /var/lib/containers/atomic/aaaaz.1
systemd-tmpfiles --remove /etc/tmpfiles.d/aaaaz.conf
systemctl daemon-reload
systemd-tmpfiles --create /etc/tmpfiles.d/aaaaz.conf
$
$ sudo dnf container check
Checking 1 local container(s) for updates
No updates found
```