## Dockerfile for building a docker imapsync image # $Id: Dockerfile,v 1.48 2024/03/17 12:26:05 gilles Exp gilles $ # I use the following command to build the image: # # docker build -t gilleslamiral/imapsync . # # where this Dockerfile is in the current directory # # This Dockerfile build an image with two imapsync # 1) One comes from https://imapsync.lamiral.info/imapsync # and goes to /usr/bin/imapsync in the Docker image # It is used with the command: # # docker run gilleslamiral/imapsync imapsync ... # # 2) One comes from the local file ./imapsync # and goes to /imapsync in the Docker image # It is used with the command: # # docker run gilleslamiral/imapsync /imapsync ... # There is also an imbedded online imapsync service called servimapsync # It can be run with the command: # # docker run -p 80:8080 -p443:8443 gilleslamiral/imapsync /servimapsync # # Then use a browser to http://localhost/ or https://localhost/ or # http://example.com/ or https://example.com/ # # It offers the same online service than # https://imapsync.lamiral.info/X/ # but without using the path /X # # I thank you very much # I like thanks # I like stars # I like money to keep on doing this stuff # Number of imapsync images pulled so far (2023_11_22): 700746 # Command used: # curl -s https://hub.docker.com/v2/repositories/gilleslamiral/imapsync/ | jq '.pull_count' # # I record the pull_count once a day and I count the day to day differrences with: # # paste -d- <(tail -n+2 W/docker_pull_count.txt) <(head -n-1 W/docker_pull_count.txt) | bc # # Thanks to https://unix.stackexchange.com/a/470069/89270 # # Debian Bookworm is Debian 12 FROM debian:bookworm LABEL maintainer="Gilles LAMIRAL " \ description="Imapsync" \ documentation="https://imapsync.lamiral.info/#doc" # I put a copy of the Dockerfile in the image itself # It can help maintenance, isn't it? # I put optionally my local and usually more recent imapsync on /, for testing purpose COPY Dockerfile imapsyn[c] prerequisites_imapsyn[c] servimapsyn[c] / # I put also the webserver script, called servimapsync and its needed files, # this is experimental stuff, http 8080, https 8443 # COPY imapsyn[c] imapsync_form_extra.htm[l] imapsync_form.cs[s] imapsync_form.j[s] privkey.pe[m] fullchain.pe[m] /var/tmp/ RUN set -xe && \ apt-get update \ && apt-get install -y \ libauthen-ntlm-perl \ libcgi-pm-perl \ libcrypt-openssl-rsa-perl \ libcrypt-openssl-pkcs12-perl \ libdata-uniqid-perl \ libencode-imaputf7-perl \ libfile-copy-recursive-perl \ libfile-tail-perl \ libio-compress-perl \ libio-socket-ssl-perl \ libio-socket-inet6-perl \ libio-tee-perl \ libhtml-parser-perl \ libjson-webtoken-perl \ libmail-imapclient-perl \ libnet-server-perl \ libparse-recdescent-perl \ libmodule-scandeps-perl \ libpar-packer-perl \ libproc-processtable-perl \ libreadonly-perl \ libregexp-common-perl \ libsys-meminfo-perl \ libterm-readkey-perl \ libtest-mockobject-perl \ libtest-pod-perl \ libunicode-string-perl \ liburi-perl \ libwww-perl \ procps \ wget \ make \ cpanminus \ lsof \ ncat \ openssl \ ca-certificates \ iputils-ping \ bind9-host \ && rm -rf /var/lib/apt/lists/* \ && cpanm IO::Socket::SSL # I added the IO::Socket::SSL update to avoid the annoying, confusing and useless warning # DEBUG: .../IO/Socket/SSL.pm:1177: global error: Undefined SSL object RUN set -xe \ && cd /usr/bin/ \ && pwd \ && { cp /imapsync . || wget -N --no-check-certificate https://imapsync.lamiral.info/imapsync \ https://imapsync.lamiral.info/prerequisites_imapsync ; } \ && /usr/bin/imapsync --testslive && /usr/bin/imapsync --tests # just_a_comment_to_force_update 2022_04_04_21_16_50 USER nobody:nogroup ENV HOME /var/tmp/ WORKDIR /var/tmp/ STOPSIGNAL SIGINT CMD ["/usr/bin/imapsync"] # # End of imapsync Dockerfile