Skip to content
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

fix container run #23

Merged
merged 2 commits into from
Jan 11, 2024
Merged

fix container run #23

merged 2 commits into from
Jan 11, 2024

Conversation

NL-TCH
Copy link
Collaborator

@NL-TCH NL-TCH commented Jan 9, 2024

this is extremly ugly, but the container exists when the script is ran, so after running the script we will tail /dev/null this will never stop so the container will never stop. again, super ugly, but i don't know a better way. maybe @jrcichra knows a cleaner method
fixes #18 resolves #18

@jrcichra
Copy link
Collaborator

There's also sleep infinity as an option.

@jrcichra
Copy link
Collaborator

You could switch the script back to a run.sh name and just include sleep infinity in there. Then you wouldn't need to shell out at the docker level.

@jrcichra
Copy link
Collaborator

I couldn't get either the docker-compose or the docker run method to work with the overriden CMD. I don't see systemd logs. We probably also need to run whatever the default for jrei/systemd-debian:12 is, or a crazy idea, include firewall-rules.sh as a systemd oneshot and leverage the fact that we're running systemd in a container.

@jrcichra
Copy link
Collaborator

The command is normally CMD ["/lib/systemd/systemd"] according to https://hub.docker.com/layers/jrei/systemd-debian/latest/images/sha256-1288ff231f93ba73984799d5881af10b50b1e4a4244bc9007560a1aa70d07fbf?context=explore

What works for me and is probably the easiest for right now is:

CMD [ "/bin/bash", "-c", "/home/firewall-rules.sh && /lib/systemd/systemd" ]

@billz
Copy link
Member

billz commented Jan 10, 2024

What works for me and is probably the easiest for right now is:

CMD [ "/bin/bash", "-c", "/home/firewall-rules.sh && /lib/systemd/systemd" ]

Also confirm the above works. This seems to be a generally accepted method in common use.

@NL-TCH
Copy link
Collaborator Author

NL-TCH commented Jan 11, 2024

thanks for helping on this one!
the new commit uses the generally used workaround.

@billz billz merged commit 23a7ce3 into RaspAP:master Jan 11, 2024
@billz
Copy link
Member

billz commented Jan 11, 2024

You betcha! Resolves #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a RPi-compatible Docker image for RaspAP
3 participants