kopia lustrzana https://github.com/jupyterhub/repo2docker
rodzic
0693fc0989
commit
b41db221b1
20
Dockerfile
20
Dockerfile
|
@ -1,23 +1,19 @@
|
||||||
ARG PYTHON_VERSION=3.7
|
ARG ALPINE_VERSION=3.9.4
|
||||||
FROM python:${PYTHON_VERSION}
|
FROM alpine:${ALPINE_VERSION}
|
||||||
|
|
||||||
|
RUN apk add --no-cache git python3 python3-dev
|
||||||
|
|
||||||
# build wheels in first image
|
# build wheels in first image
|
||||||
ADD . /tmp/src
|
ADD . /tmp/src
|
||||||
RUN mkdir /tmp/wheelhouse \
|
RUN mkdir /tmp/wheelhouse \
|
||||||
&& cd /tmp/wheelhouse \
|
&& cd /tmp/wheelhouse \
|
||||||
|
&& pip3 install wheel \
|
||||||
&& pip3 wheel --no-cache-dir /tmp/src
|
&& pip3 wheel --no-cache-dir /tmp/src
|
||||||
|
|
||||||
# run with slim variant instead of full
|
FROM alpine:${ALPINE_VERSION}
|
||||||
# since we won't need compilers and friends
|
|
||||||
FROM python:${PYTHON_VERSION}-slim
|
|
||||||
|
|
||||||
# we do need git, though
|
# install python, git
|
||||||
# git-lfs is in backports
|
RUN apk add --no-cache git git-lfs python3
|
||||||
ARG DEB_RELEASE=stretch
|
|
||||||
RUN echo "deb http://deb.debian.org/debian ${DEB_RELEASE}-backports main" > /etc/apt/sources.list.d/backports.list \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get -t ${DEB_RELEASE}-backports -y install --no-install-recommends git git-lfs \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# install repo2docker
|
# install repo2docker
|
||||||
COPY --from=0 /tmp/wheelhouse /tmp/wheelhouse
|
COPY --from=0 /tmp/wheelhouse /tmp/wheelhouse
|
||||||
|
|
Ładowanie…
Reference in New Issue