emailservice: Updated to python 3, streamlined pip install. Image size is now ~271MB
This commit is contained in:
parent
982f47e72c
commit
ad529a67bb
2 changed files with 7 additions and 13 deletions
|
@ -1,8 +1,8 @@
|
||||||
FROM python:2.7-alpine3.8 as base
|
FROM python:3.7.0-alpine3.8 as base
|
||||||
|
|
||||||
FROM base as builder
|
FROM base as builder
|
||||||
|
|
||||||
# gRPC deps
|
# gRPC and app deps
|
||||||
RUN apk add --update --no-cache \
|
RUN apk add --update --no-cache \
|
||||||
gcc \
|
gcc \
|
||||||
linux-headers \
|
linux-headers \
|
||||||
|
@ -10,23 +10,16 @@ RUN apk add --update --no-cache \
|
||||||
musl-dev \
|
musl-dev \
|
||||||
python-dev \
|
python-dev \
|
||||||
g++ \
|
g++ \
|
||||||
|
# App Deps
|
||||||
cairo-dev \
|
cairo-dev \
|
||||||
cairo \
|
cairo \
|
||||||
openssl-dev \
|
openssl-dev \
|
||||||
gobject-introspection-dev
|
gobject-introspection-dev
|
||||||
|
|
||||||
ENV GRPC_PYTHON_VERSION 1.15.0
|
|
||||||
|
|
||||||
# Install grpcio
|
|
||||||
RUN python -m pip install --upgrade pip
|
|
||||||
RUN pip install grpcio==${GRPC_PYTHON_VERSION} grpcio-tools==${GRPC_PYTHON_VERSION}
|
|
||||||
|
|
||||||
# get packages
|
# get packages
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
|
|
||||||
FROM base as final
|
FROM base as final
|
||||||
|
|
||||||
# Download the grpc health probe
|
# Download the grpc health probe
|
||||||
|
@ -40,7 +33,7 @@ ENV PYTHONUNBUFFERED=0
|
||||||
WORKDIR /email_server
|
WORKDIR /email_server
|
||||||
|
|
||||||
# Grab packages from builder
|
# Grab packages from builder
|
||||||
COPY --from=builder /usr/local/lib/python2.7/ /usr/local/lib/python2.7/
|
COPY --from=builder /usr/local/lib/python3.7/ /usr/local/lib/python3.7/
|
||||||
|
|
||||||
# Need libstdc++ for grpc
|
# Need libstdc++ for grpc
|
||||||
RUN apk add --no-cache libstdc++
|
RUN apk add --no-cache libstdc++
|
||||||
|
|
|
@ -7,7 +7,7 @@ configparser==3.5.0
|
||||||
cryptography==2.3.1
|
cryptography==2.3.1
|
||||||
entrypoints==0.2.3
|
entrypoints==0.2.3
|
||||||
enum34==1.1.6
|
enum34==1.1.6
|
||||||
futures==3.2.0
|
futures==3.1.1
|
||||||
google-api-core==1.4.0
|
google-api-core==1.4.0
|
||||||
google-auth==1.5.1
|
google-auth==1.5.1
|
||||||
google-cloud-core==0.28.1
|
google-cloud-core==0.28.1
|
||||||
|
@ -19,6 +19,7 @@ grpcio-health-checking==1.15.0
|
||||||
grpcio-tools==1.15.0
|
grpcio-tools==1.15.0
|
||||||
idna==2.7
|
idna==2.7
|
||||||
ipaddress==1.0.22
|
ipaddress==1.0.22
|
||||||
|
jeepney==0.4
|
||||||
Jinja2==2.10
|
Jinja2==2.10
|
||||||
keyring==15.1.0
|
keyring==15.1.0
|
||||||
keyrings.alt==3.1
|
keyrings.alt==3.1
|
||||||
|
@ -35,6 +36,6 @@ pytz==2018.5
|
||||||
pyxdg==0.26
|
pyxdg==0.26
|
||||||
requests==2.19.1
|
requests==2.19.1
|
||||||
rsa==4.0
|
rsa==4.0
|
||||||
SecretStorage==2.3.1
|
SecretStorage==3.1.0
|
||||||
six==1.11.0
|
six==1.11.0
|
||||||
urllib3==1.23
|
urllib3==1.23
|
Loading…
Add table
Add a link
Reference in a new issue