Dockerfile 601 B

123456789101112131415161718192021
  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_MOUNT_POINT=/encrypted/encfs \
  8. ENCFS_CONFIG_PATH=/encrypted/config/encfs6.xml \
  9. ENCFS_CONFIG_GENERATION_TIMEOUT_SECS=8
  10. COPY ./mount.sh /
  11. RUN mkdir -p \
  12. $(dirname $ENCFS_PASSWORD_PATH) \
  13. $ENCFS_SOURCE_DIR \
  14. $ENCFS_MOUNT_POINT \
  15. $(dirname $ENCFS_CONFIG_PATH) \
  16. && chmod +x /mount.sh
  17. # TODO run as unprivileged user
  18. CMD ["/mount.sh"]