Solved Escaping from "La Bastille"... How binding host folders?

Hi guys,

I am trying to build up again my Gemini server but this time I decided to use jails to run the services associate with, just for fun, and I thought that learning BastilleBSD would be cool.

I have a my BastilleBSD container up and running (somehow) but I'd would like to keep the data on the host rather than inside the "jail", I read the documentation several times but I didn't read/understand if you can bind host folders with the BastilleBSD container.

I have previous experience with Ezjail and from my experience you can use something like this inside the jail to bind folders together:

Code:
ee /etc/fstab.your-jail
/var/www/your.domain /usr/jails/your-jail/var/www/your.domain    nullfs rw 0 0

Can you achieve the same with BastilleBSD? And how?

Thanks in advance!!! ???
 
but I'd would like to keep the data on the host rather than inside the "jail"
What kind of data?
It is common use to separate databases elsewhere. I.e. having data in a database serving jail or elsewhere.

Also it is possible to use to configure null-mounts into the jail for read-only access or using a devfs_ruleset in the jail.conf.
 
getopt

For data I meant the pages for the capsule, simple text plain documents and media files such as jpg, png etc...
 
You can use the same 'trick' you used for EZJail with Bastille. The biggest difference however is that bastille uses separate fstabs for this. If you look in /usr/local/bastille/jails/<jail name>/, you will find an fstab there.

I have a jail for example with only nginx running in it. And have my poudriere package directory nullfs(5) mounted there, so I can use it to distribute my package repositories.

Code:
root@molly:~ # cat /usr/local/bastille/jails/ports/fstab
/usr/local/bastille/releases/13.0-RELEASE /usr/local/bastille/jails/ports/root/.bastille nullfs ro 0 0
/usr/local/poudriere/data/ /usr/local/bastille/jails/ports/root//data nullfs ro 0 0
Great. I see I need to edit it now. I don't have 13.0-RELEASE anymore ;)
 
Why the double slash?
Probably because I pasted it in. It's fairly useless, on FreeBSD (or any other UNIX-like system) double slashes like that are ignored, /some///////directory is treated the same as /some/directory.
 
Back
Top