Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

Commit

Permalink
Merge pull request #64 from deinspanjer/fix_docker_kwfs
Browse files Browse the repository at this point in the history
Fix readme run example and typos in docker_kwfs.sh
  • Loading branch information
mcpherrinm committed May 27, 2016
2 parents 7358f89 + fdfe3c0 commit abd52a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ docker build --rm -t keywhizfs .
After building, you can run the newly built image by running:

```
docker run --device /dev/fuse:/dev/fuse --cap-add=IPC_LOCK --cap-add=SYS_ADMIN keywhizfs --debug=true --ca=/go/src/github.com/square/keywhiz-fs/fixtures/cacert.crt --key=/go/src/github.com/square/keywhiz-fs/fixtures/client.pem https://localhost:443 /secrets/kwfs
docker run --device /dev/fuse:/dev/fuse --cap-add=IPC_LOCK --cap-add=SYS_ADMIN keywhizfs --debug --ca=/go/src/github.com/square/keywhiz-fs/fixtures/cacert.crt --key=/go/src/github.com/square/keywhiz-fs/fixtures/client.pem https://localhost:443 /secrets/kwfs
```

Note that we have to pass `--device /dev/fuse:/dev/fuse` to mount the fuse device into the container, and give `IPC_LOCK` and `SYS_ADMIN` capabilities to the container, so it can set `cap_ipc_lock` on the keywhiz-fs binary, and so it can mount fuse-fs filesystems, respectively.
Expand Down
4 changes: 2 additions & 2 deletions docker_kwfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ chown $KEYWHIZ_USER /dev/fuse
chmod 640 /dev/fuse

# This doesn't work with aufs. Need overlayFS to support it.
setcap 'cap_ipc_lock=+ep' /go/bin/keywhizfs
setcap 'cap_ipc_lock=+ep' /go/bin/keywhiz-fs

sudo -u $KEYWHIZ_USER /go/bin/keywhizfs -asuser=$KEYWHIZ_USER -group=$KEYWHIZ_USER $@
sudo -u $KEYWHIZ_USER /go/bin/keywhiz-fs --asuser=$KEYWHIZ_USER --group=$KEYWHIZ_USER $@

0 comments on commit abd52a2

Please sign in to comment.