File: Dockerfile

package info (click to toggle)
offlineimap3 0.0~git20211018.e64c254%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,240 kB
  • sloc: python: 8,089; sh: 586; makefile: 81
file content (40 lines) | stat: -rw-r--r-- 1,074 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM python:3 as base

MAINTAINER Ben Yanke <benyanke@gmail.com>

##############
# Main setup stage
##############

# Copy in deps first, to improve build caching
COPY requirements.txt /app-src/requirements.txt
WORKDIR /app-src

# Get kerberos deps before pip deps can be fetched
#RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y krb5-user -y && rm -rf /var/lib/apt/lists/*

# Get latest pip and dependencies
RUN /usr/local/bin/python3 -m pip install --upgrade pip && pip install -r requirements.txt

# Copy in rest of the code after deps are in place
COPY . /app-src

# Install the app
RUN /usr/local/bin/python3 setup.py install

##############
# Run tests in a throwaway stage
# if tests are added later, run them here
##############
#FROM base as test
#WORKDIR /app-src
#RUN /usr/local/bin/python3 setup.py test

##############
# Throw away the test stage, revert back to base stage before push
##############

FROM base
WORKDIR /root
CMD ["/usr/local/bin/offlineimap"]
# reads from /root/.offlineimaprc by default - mount this in for running