Dockerfile 758 B

123456789101112131415161718192021222324252627
  1. FROM alpine:3.9
  2. RUN apk add --no-cache encfs
  3. ENV ENCFS_PASSWORD_CHARSET="1-9a-km-zA-HJKLMNPR-Z*+!&#@%.\-_" \
  4. ENCFS_PASSWORD_LENGTH=32 \
  5. ENCFS_PASSWORD_PATH=/secret/password \
  6. ENCFS_SOURCE_DIR=/plain \
  7. ENCFS_TARGET_DIR=/encrypted
  8. ENV ENCFS_MOUNT_POINT=$ENCFS_TARGET_DIR/encfs \
  9. ENCFS_CONFIG_COPY_PATH=$ENCFS_TARGET_DIR/encfs6.xml
  10. COPY ./mount.sh /
  11. RUN adduser -S encrypt \
  12. && mkdir -p \
  13. $(dirname $ENCFS_PASSWORD_PATH) \
  14. $ENCFS_SOURCE_DIR \
  15. $ENCFS_TARGET_DIR \
  16. && chown -c encrypt \
  17. $(dirname $ENCFS_PASSWORD_PATH) \
  18. $ENCFS_SOURCE_DIR `#.encfs6xml` \
  19. $ENCFS_TARGET_DIR \
  20. && echo user_allow_other >> /etc/fuse.conf \
  21. && chmod a+rx /mount.sh
  22. USER encrypt
  23. CMD ["/mount.sh"]