-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PORT_SCRIPT ENV variable does not work. #62
Comments
docker-wireguard-pia/pf_success.sh Lines 24 to 25 in d55b299
Is the custom script executable? That's the only thing that comes to mind. The custom script is only run if set It might be worth running |
The script resides on the host path. The POST_SCRIPT env points to the location to where the script is on the host path. Does the dockerfile copy the file inside the container? |
I should probably update the docs a bit to clarify that. |
I'm actually encountering this same issue, but I've included my the script within the already mounted This is the log from docker-wireguard-pia:
Logging into container (
But if I test the file it does not think that it is:
But if I just manually execute the script from within the container it does run just fine:
Relevant section of the docker-compose.yml:
Any thoughts? I'm not sure what to make of this at the moment. |
That reminds be a bit of another issue - #28 - where a mounted file existed and was readable, but the test was still failing. In this case I could probably just remove the check that the file exists and is executable before running it. That way at least it might throw more descriptive error if something goes wrong. |
Interesting, yeah, that looks like a very similar problem in nature. This is running on Ubuntu as well, albeit Ubuntu 22.04.2 LTS. I did a similar test with -x outside the container and that does pass as executable, so its from the container only that the test fails for execute. It makes me wonder about a problem with the user/group somehow, but its owned by root:root. I did an inspect on the container and the mounts look normal too I think.
|
Is #74 enough to work around it? I can stick it on Docker hub and tag it as testing if it's more convenient than manually building it. |
Hey, thanks for that. I actually just learned that with docker-compose you can just replace the Using the new branch without the
Thanks for the quick help on this! |
TIL! That's actually looks really handy.
The custom script gets forked and run in the background just in case it needs to stays running so any log messages will just come out as they happen. I could probably re-order things slightly though just to tidy that up. |
@jordanpatrick Could you share the script you made that update the qbittorent port on port-forwarding change ? |
@Belphemur Oh sure, I can't even take credit for it, as I am using the script thrnz posted here |
Thanks @jordanpatrick |
I am trying to use port_script env to run a script to set the open port to my torrent client. However, when inspecting the container, i dont see the script being run.
Here is my docker compose file
Here is the dump from the container
The text was updated successfully, but these errors were encountered: