OASIS-learn-study / minecraft-storeys-maker

Minecraft extension to make your own stories in, with and for Minecraft - it's like being a movie director!
https://www.learn.study
GNU Affero General Public License v3.0
14 stars 10 forks source link

Support docker AND podman (just via podman-docker) #375

Closed vorburger closed 2 years ago

vorburger commented 2 years ago

I've tried adding support for using docker (in addition to podman, because dnf install podman-docker aliases it).

It doesn't quite work yet, because (apparently) there is no docker healthcheck, so we would need to find an alternative (some other time). But apart from that this seems to work fine. This (together with #372 and #374) could make it possible to work on this project using GitHub Codespaces (customized with my own dotfiles).

@edewit FYI

vorburger commented 2 years ago

This will need a rebase after #381 is merged. That PR adds docker support for ./make, whereas this one will finish that up by adding Docker support for ./test by figuring out the docker healthcheck stuff. That's a pre-requisite for #382.

vorburger commented 2 years ago

because (apparently) there is no docker healthcheck

by figuring out the docker healthcheck stuff

Huh, from a quick web search, apparently people do this with docker [container?] inspect --format='{{json .State.Health.Status}}', and checking its output by "string compare" in bash? I can't see a way to (easily) get a bool 0/1 return value out of that, to use this in a script.

An alternative would be to manually invoke the command of the HEALTHCHECK (in the container), but that's (a little bit) of a duplication which seems like a shame, if it can be avoided (with reasonable effort).

vorburger commented 2 years ago

@edewit ready for your review. With this ./test should now work for both podman and docker.

On Fedora without "real" docker you'll need to sudo dnf install podman-docker for the (kind of) alias though.

vorburger commented 2 years ago

dnf docker-podman can't be installed

The package is called podman-docker (not docker-podman), see e.g. here.

What error do you get when you sudo dnf install podman-docker?

edewit commented 2 years ago

I've sorted it it conflicted as I had old docker files installed and a dnf clean packages removed them