Enabling other container tools then docker
I find this script highly useful. As we are also using other docker cmd capable tools out there, like Podman or Finch, I want to adapt the script to be able to supply a docker/oci capable tool here.
I tested with docker the import export. However the save / load does not yet work, as the output of "$CONTAINER ps -lq" exists only in docker and Podman has others.
Still the base is working.
Also I found there was a typo in your latest script @Guiorgy It was in the fulldirname function.
Any update on the review? @Guiorgy, @BretFisher
We probably should wait for someone to test this on Finch just in case before considering merging, less we want a repeat of ;& ;P
We probably should wait for someone to test this on Finch just in case before considering merging, less we want a repeat of
;&;P
I can try this one on finch, have it running as well. I'll need to plan this in, so maybe 1-2 days.
We probably should wait for someone to test this on Finch just in case before considering merging, less we want a repeat of
;&;P
So, was a bit faster. It does not run nicely, however the error is weird, as it does not read the redlink before it starts a container, it did no occur with Podman, which is strange, as it should have fired an error. Anyway, if I comment out the readlink portion, it complains about relative paths, but as nerdctl can use that, it works:
Relevant Script Portion:
I will continue to test tomorrow again with Podman. Something seems amiss in the directory resolution of fulldirname().
@Guiorgy It seems that the readlink call with option -m is not supported, and it looks like doing it mit -f solves the problem. https://stackoverflow.com/questions/59895/how-do-i-get-the-directory-where-a-bash-script-is-located-from-within-the-script
However in the latest OSX versions, this seems to be rectified.
@Guiorgy : I did with the latest version do a test with Finch and Podman on macOS 14.7.1 on a MacBook Pro M1 Pro. Can you test on a linux system whether it works there with finch and podman as well?
From man pages:
- The -f option found in many implementations was not included, as the realpath utility provides equivalent functionality with a choice of behaviors.
- The realpath utility was added in preference to a -f option found in some implementations of the readlink utility ...
~Can you try realpath instead? Might be better to use that.~
Edit: On Linux systems, at the moment, your best bet to canonicalize a path that may contain symbolic links is readlink -f. - StackOverflow user, 2019
Also, please refrain from modifications that fall outside the intent of this PR, like #!/bin/bash -> #!/usr/bin/env bash. Than should be a separate PR, so Bret can choose whether to include a subset of the changes.
Edit:
Can you test on a linux system whether it works there with finch and podman as well?
Not familiar with either, have never used them. I'll try them if I have the time next weekend.
Also, please refrain from modifications that fall outside the intent of this PR, like
#!/bin/bash->#!/usr/bin/env bash. Than should be a separate PR, so Bret can choose whether to include a subset of the changes.
I created a new PR here: https://github.com/BretFisher/docker-vackup/pull/27
Any update here?
@BretFisher / @Guiorgy Any news on the Pull request?
I'm just another contributor like you, so ¯\_(ツ)_/¯
Hi @BretFisher Any news on the review? Would love to have this "officially" available
Sorry, I don't plan on this script supporting anything but the docker CLI. I fixed some things in #33 but if you want podman, finch, or nerdctl support, I recommend a fork where you tweak the commands for those CLIs. I'm happy to link to forks supporting other runtimes.