mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #692] Running docker via firejail #473
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#473
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @agamdua on GitHub (Aug 8, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/692
This is not an "issue" - just trying to understand something and was directed here from the support page.
On the FAQ there's a section mentioning that docker can be run under firejail, and with the below command I can definitely do that.
Is there a point to still use it this way if I have to use
sudoto be root for docker anyway?@netblue30 commented on GitHub (Aug 9, 2016):
It wouldn't make sense to run it this way. I've seen people doing the other way around: start docker, and inside docker, as root, they run the server programs under firejail. You can also use a docker filesystem and mount it in firejail using --chroot, but you still have to be root to do it and start programs in the jail.
@agamdua commented on GitHub (Aug 10, 2016):
So I tried something which seems to suggest there is some benefit:
Now I want to see what happens to root while in a firejail:
Apparently at this stage it cannot really see anything else apart from what is in the current firejail "session". That's odd, because above we see that
workspaceis owned byroot:root.If we switch to
rootandlsyet again:Interestingly enough, it can see everything from before the "session", but the
dummydir never gets created.@netblue30 commented on GitHub (Aug 11, 2016):
In your case, a tmpfs filesystem is mounted on top of /home in order to protect the existing user accounts. All new files you bring under /home will get lost when you close the sandbox.
@agamdua commented on GitHub (Aug 11, 2016):
Also, I am not extremely familiar with this vs the alternatives like app armor - I am looking these things up and reading into docker docs for security https://docs.docker.com/engine/security/security/
@agamdua commented on GitHub (Aug 11, 2016):
I see - I am able to create things in
/that persist.Would it be smarter to just build docker with seccomp and configure it via this: https://docs.docker.com/engine/security/seccomp/ ?
Thanks for answering the questions - its helped clear the confusion!
Update: I just want to add that I am not asking as a "how can I do this", there are a variety of ways of how to achieve what I want. Just wondering if firejail is really the right tool for the job, and if not (which you've mentioned before) then why. Thanks again for your time! :)
@netblue30 commented on GitHub (Aug 12, 2016):
It depends what you need it for. If you are looking for a virtualization solution you stay with docker and configure seccomp, capabilities, SELinux or AppArmor and everything else they have available. Or you can start your server under firejail inside your docker container. Firejail is strictly a security solution. it has some virtualization features but it doesn't come close to docker.