Skip to content

feature/apparmor.md: add info to install lxc #19

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions doc/feature/apparmor.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ If your Docker host has [AppArmor](https://wiki.ubuntu.com/AppArmor) activated,
mount fstype=nfs*,
mount fstype=rpc_pipefs,
}

1. Load this profile into the kernel with [`apparmor_parser`](http://manpages.ubuntu.com/manpages/xenial/man8/apparmor_parser.8.html):

$ sudo apparmor_parser -r -W /path/to/file/from/previous/step

> `abstractions/lxc/container-base` may be missing when adding `AppArmor` profile.
> In such case, install `lxc` package: `sudo apt install lxc`.

1. Add `--security-opt apparmor=erichough-nfs` to your `docker run` command. e.g.

docker run \
Expand All @@ -28,9 +31,9 @@ If your Docker host has [AppArmor](https://wiki.ubuntu.com/AppArmor) activated,
-p 2049:2049 \
--security-opt apparmor=erichough-nfs \
erichough/nfs-server

or in `docker-compose.yml`:

```YAML
version: 3
services:
Expand All @@ -45,4 +48,4 @@ If your Docker host has [AppArmor](https://wiki.ubuntu.com/AppArmor) activated,
- 2049:2049
security_opt:
- apparmor=erichough-nfs
```
```