Closed septatrix closed 3 years ago
I'm interested in this feature as well - may you share your working solution either as PR or just as a branch in a fork? :)
Hi @septatrix,
that's a nice proposal!
Loving the :z
which I would like to propose since ages too, regardless this issue.
Would you mind to create a PR for your patch proposal? Just a couple of quick notes:
443
to 9443
even for the unused SSL, for future purposesadminer
here and propose it in a separate issue: it would be a nice proposal, not required here to make podman
happyHTH, Matteo
First of all, thanks for the patch @septatrix :) I'll cobble the parts together that are relevant to me.
Regarding the :z
option: I'm not sure whether this should be included by default, since it fiddles with filesystem labels and does not restore them afterwards.
After reading https://github.com/containers/podman/issues/8786 and https://github.com/moby/moby/issues/30934 I'd come to the conclusion that it is only an issue if someone sets MOODLE_DOCKER_WWWROOT=/home/username
or something similar. Which does not make much sense.
Do you use the :z
option, because you have SELinux enabled on your workstation?
And another question: How do you launch it finally using podman-compose
?
Do you invoke podman-compose
without the wrapper script in bin/moodle-docker-compose
? Since bash aliases are not expanded in scripts by default, they are not really an option. I've worked around it by using this approach (with .local/bin
included in my PATH
):
cat ~/.local/bin/docker-compose
#!/bin/bash
podman-compose "$@"
Do you think it is worth it to introduce an environment variable that allows you change the base command from docker-compose
to podman-compose
?
Would you mind to create a PR for your patch proposal?
It seems like @dahrens already did that :D
Regarding the
:z
option: I'm not sure whether this should be included by default, since it fiddles with filesystem labels and does not restore them afterwards.After reading containers/podman#8786 and moby/moby#30934 I'd come to the conclusion that it is only an issue if someone sets
MOODLE_DOCKER_WWWROOT=/home/username
or something similar. Which does not make much sense.Do you use the
:z
option, because you have SELinux enabled on your workstation?
Yes. I use Fedora which has SELinux enabled. Without :z
the container would not start.
And another question: How do you launch it finally using
podman-compose
?[...]
Do you think it is worth it to introduce an environment variable that allows you change the base command from
docker-compose
topodman-compose
?
I have symlinked ~/.local/bin/docker-compose
to /usr/bin/podman-compose
. Environment variables seem a bit overkill. They would be justified if this was something one would change between runs but that is probably not the case.
Would you mind to create a PR for your patch proposal?
It seems like @dahrens already did that :D
It was a good opportunity to get a better understanding on how the whole thing here works internally. I'm quite new to moodle and needed to learn what this exttest is at all ;)
Regarding the
:z
option: I'm not sure whether this should be included by default, since it fiddles with filesystem labels and does not restore them afterwards. After reading containers/podman#8786 and moby/moby#30934 I'd come to the conclusion that it is only an issue if someone setsMOODLE_DOCKER_WWWROOT=/home/username
or something similar. Which does not make much sense. Do you use the:z
option, because you have SELinux enabled on your workstation?Yes. I use Fedora which has SELinux enabled. Without
:z
the container would not start.
I left out the :z
option in the PR. IMO this should be a separate commit anyways. Since it might cause troubles in some cases I'd prefer one or two additional evaluations - e.g. from windows folks, I did not take windows into account as I don't know about it.
And another question: How do you launch it finally using
podman-compose
? [...] Do you think it is worth it to introduce an environment variable that allows you change the base command fromdocker-compose
topodman-compose
?I have symlinked
~/.local/bin/docker-compose
to/usr/bin/podman-compose
. Environment variables seem a bit overkill. They would be justified if this was something one would change between runs but that is probably not the case.
symlinks :facepalm: yes - this is straight forward :D
Closed by #175 , thanks!
podman is a modern alternative to docker and runs without a daemon and without root. It is also the default on some distros like Fedora. podman-compose is a compatibility layer to use docker-compose files with podman.
The problem: It does not support two containers binding to the same port (even inside the container network). As the webserver and exttest container both bind to port 80 this is problematic.
Proposed solution: Mount a config file inside the exttest container to change the port to 9000 by default and adjust the config template correspondingly. I tested this and it work like a charm.