docker-vackup icon indicating copy to clipboard operation
docker-vackup copied to clipboard

Enabling other container tools then docker

Open markaltmann opened this issue 1 year ago • 13 comments

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.

markaltmann avatar Nov 20 '24 15:11 markaltmann

Also I found there was a typo in your latest script @Guiorgy It was in the fulldirname function.

markaltmann avatar Nov 20 '24 15:11 markaltmann

Any update on the review? @Guiorgy, @BretFisher

markaltmann avatar Nov 21 '24 11:11 markaltmann

We probably should wait for someone to test this on Finch just in case before considering merging, less we want a repeat of ;& ;P

Guiorgy avatar Nov 21 '24 12:11 Guiorgy

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.

markaltmann avatar Nov 25 '24 13:11 markaltmann

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:

image

Relevant Script Portion: image

I will continue to test tomorrow again with Podman. Something seems amiss in the directory resolution of fulldirname().

markaltmann avatar Nov 25 '24 15:11 markaltmann

@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

image

However in the latest OSX versions, this seems to be rectified.

markaltmann avatar Nov 25 '24 15:11 markaltmann

@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?

markaltmann avatar Nov 25 '24 16:11 markaltmann

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.

Guiorgy avatar Nov 25 '24 16:11 Guiorgy

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

markaltmann avatar Nov 29 '24 14:11 markaltmann

Any update here?

markaltmann avatar Dec 18 '24 20:12 markaltmann

@BretFisher / @Guiorgy Any news on the Pull request?

markaltmann avatar Mar 07 '25 13:03 markaltmann

I'm just another contributor like you, so ¯\_(ツ)_/¯

Guiorgy avatar Mar 07 '25 13:03 Guiorgy

Hi @BretFisher Any news on the review? Would love to have this "officially" available

markaltmann avatar Jun 04 '25 08:06 markaltmann

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.

BretFisher avatar Jul 26 '25 07:07 BretFisher