Sign inSign up

ahabb1/python

By ahabb1

•Updated over 6 years ago

This image includes python, pip and pre-created wheels for google cloud libraries (ex. grpcio)

Image
0

10K+

ahabb1/python repository overview

Example usage as builder:

From ahabb1/python:3.8-alpine as builder

From <your-base-image>

COPY --from=builder /root/.cache/pip/wheels/ <bath-to-your-pip-wheels-dir>

⁠Dockerfile:

⁠3.8-alpine
FROM alpine:3.11

RUN echo "**** install Python ****" && \
    apk add --no-cache python3==3.8.2-r0 && \
    if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \
    \
    echo "**** install pip ****" && \
    python3 -m ensurepip && \
    rm -r /usr/lib/python*/ensurepip && \
    pip3 install --no-cache --upgrade pip==20.0.2 setuptools==40.6.2 wheel==0.34.2 && \
    if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi

RUN apk add --no-cache alpine-sdk==1.0-r0 linux-headers==4.19.36-r0 python3-dev==3.8.2-r0

RUN pip install google-cloud-pubsub

⁠3.6-alpine
FROM alpine:3.7

RUN echo "**** install Python ****" && \
    apk add --no-cache python3==3.6.9-r1 && \
    if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \
    \
    echo "**** install pip ****" && \
    python3 -m ensurepip && \
    rm -r /usr/lib/python*/ensurepip && \
    pip3 install --no-cache --upgrade pip==20.0.2 setuptools==40.6.2 wheel==0.34.2 && \
    if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi

RUN apk add --no-cache alpine-sdk==0.5-r0 linux-headers==4.4.6-r2 python3-dev==3.6.9-r1

RUN pip install google-cloud-pubsub

Tag summary

Content type

Image

Digest

Size

172.3 MB

Last updated

over 6 years ago

docker pull ahabb1/python:3.8-alpine