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

129 lines
3.8 KiB
Plaintext
Raw Normal View History

2017-09-23 23:54:48 +02:00
#!/bin/cat
2022-10-25 04:20:30 +02:00
# $Id: INSTALL.Docker_build.txt,v 1.17 2022/05/17 14:29:36 gilles Exp gilles $
2017-09-23 23:54:48 +02:00
2019-07-03 01:17:46 +02:00
This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/
https://imapsync.lamiral.info/INSTALL.d/INSTALL.Docker_build.txt
=======================================================================
Building an imapsync docker image from Debian
=======================================================================
2017-09-23 23:54:48 +02:00
2020-04-11 01:15:57 +02:00
Nearly verbatim copy from https://imapsync.lamiral.info/INSTALL.d/Dockerfile
2022-02-15 19:29:45 +01:00
(verbatim but the Dockerfile rcs tag $ removed because it would conflict)
2017-09-23 23:54:48 +02:00
2020-04-11 01:15:57 +02:00
## Dockerfile for building a docker imapsync image
2017-09-23 23:54:48 +02:00
2022-06-01 17:47:18 +02:00
# Id: Dockerfile,v 1.42 2022/04/04 19:16:50 gilles Exp gilles $
2020-04-11 01:15:57 +02:00
# I use the following command to build the image:
#
# docker build -t gilleslamiral/imapsync .
#
# where this Dockerfile is in the current directory
#
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 ...
2022-02-15 19:29:45 +01:00
# I thank you very much
2020-04-11 01:15:57 +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
2017-09-23 23:54:48 +02:00
2022-06-01 17:47:18 +02:00
# Number of imapsync images pulled so far (2022_04_04): 673551
2022-02-15 19:29:45 +01:00
# Command used:
# curl -s https://hub.docker.com/v2/repositories/gilleslamiral/imapsync/ | jq '.pull_count'
2022-06-01 17:47:18 +02:00
# Debian Bullseye is Debian 11
2017-09-23 23:54:48 +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"
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
2020-04-11 01:15:57 +02:00
2022-02-15 19:29:45 +01:00
COPY Dockerfile imapsyn[c] prerequisites_imapsyn[c] /
2020-04-11 01:15:57 +02:00
RUN set -xe && \
apt-get update \
2017-09-23 23:54:48 +02:00
&& apt-get install -y \
libauthen-ntlm-perl \
libcgi-pm-perl \
libcrypt-openssl-rsa-perl \
libdata-uniqid-perl \
2020-04-11 01:15:57 +02:00
libencode-imaputf7-perl \
2017-09-23 23:54:48 +02:00
libfile-copy-recursive-perl \
2022-02-15 19:29:45 +01:00
libfile-tail-perl \
libio-compress-perl \
2017-09-23 23:54:48 +02:00
libio-socket-ssl-perl \
2020-04-11 01:15:57 +02:00
libio-socket-inet6-perl \
2017-09-23 23:54:48 +02:00
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 \
2017-09-23 23:54:48 +02:00
libreadonly-perl \
2018-05-07 16:04:23 +02:00
libregexp-common-perl \
2017-09-23 23:54:48 +02:00
libsys-meminfo-perl \
libterm-readkey-perl \
libtest-mockobject-perl \
libtest-pod-perl \
libunicode-string-perl \
liburi-perl \
libwww-perl \
procps \
wget \
2020-04-11 01:15:57 +02:00
make \
cpanminus \
lsof \
2022-02-15 19:29:45 +01:00
ncat \
openssl \
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
2017-09-23 23:54:48 +02:00
2020-04-11 01:15:57 +02:00
RUN set -xe \
2022-02-15 19:29:45 +01:00
&& cd /usr/bin/ \
2020-04-11 01:15:57 +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
ENV HOME /var/tmp/
2017-09-23 23:54:48 +02:00
2020-04-11 01:15:57 +02:00
WORKDIR /var/tmp/
STOPSIGNAL SIGINT
2017-09-23 23:54:48 +02:00
CMD ["/usr/bin/imapsync"]
2020-04-11 01:15:57 +02:00
#
# End of imapsync Dockerfile
2019-07-03 01:17:46 +02:00
=======================================================================
=======================================================================