1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-17 00:02:29 +01:00
imapsync/INSTALL.d/Dockerfile

113 lines
3.0 KiB
Docker
Raw Normal View History

2019-07-03 01:20:46 +02:00
## Dockerfile for building a docker imapsync image
2022-10-25 04:20:30 +02:00
# $Id: Dockerfile,v 1.43 2022/05/17 14:29:36 gilles Exp gilles $
2019-07-03 01:20:46 +02:00
# I use the following command to build the image:
#
2021-08-04 21:14:36 +02:00
# docker build -t gilleslamiral/imapsync .
2019-07-03 01:20:46 +02:00
#
# where this Dockerfile is in the current directory
2021-08-04 21:14:36 +02:00
#
2022-06-01 17:47:18 +02:00
# 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 ...
# I thank you very much
2019-07-03 01:20:46 +02:00
# I like thanks
# I like stars
2022-06-01 17:47:18 +02:00
# I like money to keep on doing this stuff
2019-07-03 01:20:46 +02:00
2022-06-01 17:47:18 +02:00
# Number of imapsync images pulled so far (2022_04_04): 673551
2020-04-11 01:15:57 +02:00
# Command used:
# curl -s https://hub.docker.com/v2/repositories/gilleslamiral/imapsync/ | jq '.pull_count'
2019-07-03 01:20:46 +02:00
2022-06-01 17:47:18 +02:00
# Debian Bullseye is Debian 11
2019-07-03 01:20:46 +02:00
2022-06-01 17:47:18 +02:00
FROM debian:bullseye
2020-04-11 01:15:57 +02:00
LABEL maintainer="Gilles LAMIRAL <gilles@lamiral.info>" \
description="Imapsync" \
documentation="https://imapsync.lamiral.info/#doc"
2019-07-03 01:20:46 +02:00
2022-02-15 19:29:45 +01:00
# I put a copy of the Dockerfile in the image itself
# It can help maintenance, isn't it?
# Also put optionally my local and usually more recent imapsync on /, for testing purpose
2021-08-04 21:14:36 +02:00
2022-02-15 19:29:45 +01:00
COPY Dockerfile imapsyn[c] prerequisites_imapsyn[c] /
2021-08-04 21:14:36 +02:00
RUN set -xe && \
apt-get update \
&& apt-get install -y \
libauthen-ntlm-perl \
libcgi-pm-perl \
libcrypt-openssl-rsa-perl \
libdata-uniqid-perl \
libencode-imaputf7-perl \
libfile-copy-recursive-perl \
2022-02-15 19:29:45 +01:00
libfile-tail-perl \
libio-compress-perl \
2021-08-04 21:14:36 +02:00
libio-socket-ssl-perl \
libio-socket-inet6-perl \
libio-tee-perl \
libhtml-parser-perl \
libjson-webtoken-perl \
libmail-imapclient-perl \
libparse-recdescent-perl \
libmodule-scandeps-perl \
libpar-packer-perl \
2022-10-25 04:20:30 +02:00
libproc-processtable-perl \
2021-08-04 21:14:36 +02:00
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 \
2022-02-15 19:29:45 +01:00
ca-certificates \
2022-06-01 17:47:18 +02:00
&& 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
2021-08-04 21:14:36 +02:00
RUN set -xe \
2022-02-15 19:29:45 +01:00
&& cd /usr/bin/ \
2021-08-04 21:14:36 +02:00
&& pwd \
2022-02-15 19:29:45 +01:00
&& wget -N --no-check-certificate https://imapsync.lamiral.info/imapsync \
https://imapsync.lamiral.info/prerequisites_imapsync \
https://raw.githubusercontent.com/google/gmail-oauth2-tools/master/python/oauth2.py \
&& chmod +x imapsync oauth2.py \
2022-06-01 17:47:18 +02:00
&& /usr/bin/imapsync --testslive && /usr/bin/imapsync --tests # just_a_comment_to_force_update 2022_04_04_21_16_50
2020-04-11 01:15:57 +02:00
USER nobody:nogroup
2019-07-03 01:20:46 +02:00
ENV HOME /var/tmp/
2020-04-11 01:15:57 +02:00
WORKDIR /var/tmp/
STOPSIGNAL SIGINT
2019-07-03 01:20:46 +02:00
CMD ["/usr/bin/imapsync"]
2021-08-04 21:14:36 +02:00
#
# End of imapsync Dockerfile