Decrypt an EncFS-directory with Docker. Based on Alpine Linux (16mb)
docker run -it --name encfs-decrypt \
--cap-add SYS_ADMIN \
--device /dev/fuse \
--security-opt apparmor:unconfined \
-e ENCFS_PWD=pwd \
-e ENCFS_OPTS=-o allow_other \
-v "/path/to/source/directory:/src:shared" \
-v "/path/to/target/directory:/dest:shared" \
-v "/path/to/encfs.xml:/config/encfs.xml:ro" \
woelfl/docker-encfs
Source directory (e.g., encrypted files):
-v "/path/to/source/directory:/src:shared"
Target directory (e.g.., decrypted files):
-v "/path/to/target/directory:/dest:shared"
File containting the EncFS config:
-v "/path/to/encfs.xml:/config/encfs.xml:ro"
Environment variable ENCFS_PWD
to specify the encfs password
-e ENCFS_PWD=pwd
Environment variable ENCFS_OPTS
to pass options to encfs (such as -o allow_other or --reverse)
-e ENCFS_OPTS=-o allow_other -o nonempty --reverse
Docker compose file:
version: '2.1'
services:
encfs-decrypt:
container_name: encfs-decrypt
image: woelfl/docker-encfs
devices:
- /dev/fuse
cap_add:
- SYS_ADMIN
security_opt:
- apparmor:unconfined
environment:
- ENCFS_PWD=pwd
- ENCFS_OPTS=-o allow_other,nonempty
volumes:
- /path/to/source/directory:/src:shared
- /path/to/target/directory:/dest:shared
- /path/to/encfs.xml:/config/encfs.xml:ro