Dockerfile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. ## Dockerfile for building a docker imapsync image
  2. # $Id: Dockerfile,v 1.43 2022/05/17 14:29:36 gilles Exp gilles $
  3. # I use the following command to build the image:
  4. #
  5. # docker build -t gilleslamiral/imapsync .
  6. #
  7. # where this Dockerfile is in the current directory
  8. #
  9. # This Dockerfile build an image with two imapsync
  10. # 1) One comes from https://imapsync.lamiral.info/imapsync
  11. # and goes to /usr/bin/imapsync in the Docker image
  12. # It is used with the command:
  13. #
  14. # docker run gilleslamiral/imapsync imapsync ...
  15. #
  16. # 2) One comes from the local file ./imapsync
  17. # and goes to /imapsync in the Docker image
  18. # It is used with the command:
  19. #
  20. # docker run gilleslamiral/imapsync /imapsync ...
  21. # I thank you very much
  22. # I like thanks
  23. # I like stars
  24. # I like money to keep on doing this stuff
  25. # Number of imapsync images pulled so far (2022_04_04): 673551
  26. # Command used:
  27. # curl -s https://hub.docker.com/v2/repositories/gilleslamiral/imapsync/ | jq '.pull_count'
  28. # Debian Bullseye is Debian 11
  29. FROM debian:bullseye
  30. LABEL maintainer="Gilles LAMIRAL <gilles@lamiral.info>" \
  31. description="Imapsync" \
  32. documentation="https://imapsync.lamiral.info/#doc"
  33. # I put a copy of the Dockerfile in the image itself
  34. # It can help maintenance, isn't it?
  35. # Also put optionally my local and usually more recent imapsync on /, for testing purpose
  36. COPY Dockerfile imapsyn[c] prerequisites_imapsyn[c] /
  37. RUN set -xe && \
  38. apt-get update \
  39. && apt-get install -y \
  40. libauthen-ntlm-perl \
  41. libcgi-pm-perl \
  42. libcrypt-openssl-rsa-perl \
  43. libcrypt-openssl-pkcs12-perl \
  44. libdata-uniqid-perl \
  45. libencode-imaputf7-perl \
  46. libfile-copy-recursive-perl \
  47. libfile-tail-perl \
  48. libio-compress-perl \
  49. libio-socket-ssl-perl \
  50. libio-socket-inet6-perl \
  51. libio-tee-perl \
  52. libhtml-parser-perl \
  53. libjson-webtoken-perl \
  54. libmail-imapclient-perl \
  55. libparse-recdescent-perl \
  56. libmodule-scandeps-perl \
  57. libpar-packer-perl \
  58. libproc-processtable-perl \
  59. libreadonly-perl \
  60. libregexp-common-perl \
  61. libsys-meminfo-perl \
  62. libterm-readkey-perl \
  63. libtest-mockobject-perl \
  64. libtest-pod-perl \
  65. libunicode-string-perl \
  66. liburi-perl \
  67. libwww-perl \
  68. procps \
  69. wget \
  70. make \
  71. cpanminus \
  72. lsof \
  73. ncat \
  74. openssl \
  75. ca-certificates \
  76. && rm -rf /var/lib/apt/lists/* \
  77. && cpanm IO::Socket::SSL
  78. # I added the IO::Socket::SSL update to avoid the annoying, confusing and useless warning
  79. # DEBUG: .../IO/Socket/SSL.pm:1177: global error: Undefined SSL object
  80. RUN set -xe \
  81. && cd /usr/bin/ \
  82. && pwd \
  83. && wget -N --no-check-certificate https://imapsync.lamiral.info/imapsync \
  84. https://imapsync.lamiral.info/prerequisites_imapsync \
  85. https://raw.githubusercontent.com/google/gmail-oauth2-tools/master/python/oauth2.py \
  86. && chmod +x imapsync oauth2.py \
  87. && /usr/bin/imapsync --testslive && /usr/bin/imapsync --tests # just_a_comment_to_force_update 2022_04_04_21_16_50
  88. USER nobody:nogroup
  89. ENV HOME /var/tmp/
  90. WORKDIR /var/tmp/
  91. STOPSIGNAL SIGINT
  92. CMD ["/usr/bin/imapsync"]
  93. #
  94. # End of imapsync Dockerfile