kopia lustrzana https://github.com/jupyterhub/repo2docker
Put everything inside a venv
rodzic
dd9f6ad2de
commit
756e7d1a98
20
Dockerfile
20
Dockerfile
|
@ -5,12 +5,17 @@ FROM alpine:${ALPINE_VERSION}
|
||||||
RUN apk add --no-cache git python3 python3-dev py3-pip py3-setuptools build-base
|
RUN apk add --no-cache git python3 python3-dev py3-pip py3-setuptools build-base
|
||||||
|
|
||||||
# build wheels in first image
|
# build wheels in first image
|
||||||
|
ENV VIRTUAL_ENV /opt/venv
|
||||||
|
ENV PATH ${VIRTUAL_ENV}/bin:${PATH}
|
||||||
|
|
||||||
|
RUN python3 -m venv ${VIRTUAL_ENV}
|
||||||
|
|
||||||
ADD . /tmp/src
|
ADD . /tmp/src
|
||||||
RUN cd /tmp/src && git clean -xfd && git status
|
RUN cd /tmp/src && git clean -xfd && git status
|
||||||
RUN mkdir /tmp/wheelhouse \
|
RUN mkdir /tmp/wheelhouse \
|
||||||
&& cd /tmp/wheelhouse \
|
&& cd /tmp/wheelhouse \
|
||||||
&& pip3 install wheel \
|
&& pip install wheel \
|
||||||
&& pip3 wheel --no-cache-dir /tmp/src \
|
&& pip wheel --no-cache-dir /tmp/src \
|
||||||
&& ls -l /tmp/wheelhouse
|
&& ls -l /tmp/wheelhouse
|
||||||
|
|
||||||
FROM alpine:${ALPINE_VERSION}
|
FROM alpine:${ALPINE_VERSION}
|
||||||
|
@ -18,13 +23,18 @@ FROM alpine:${ALPINE_VERSION}
|
||||||
# install python, git, bash, mercurial
|
# install python, git, bash, mercurial
|
||||||
RUN apk add --no-cache git git-lfs python3 py3-pip py3-setuptools bash docker mercurial
|
RUN apk add --no-cache git git-lfs python3 py3-pip py3-setuptools bash docker mercurial
|
||||||
|
|
||||||
|
ENV VIRTUAL_ENV /opt/venv
|
||||||
|
ENV PATH ${VIRTUAL_ENV}/bin:${PATH}
|
||||||
|
|
||||||
|
RUN python3 -m venv ${VIRTUAL_ENV}
|
||||||
|
|
||||||
# install hg-evolve (Mercurial extensions)
|
# install hg-evolve (Mercurial extensions)
|
||||||
RUN pip3 install hg-evolve --user --no-cache-dir
|
RUN pip install hg-evolve --user --no-cache-dir
|
||||||
|
|
||||||
# install repo2docker
|
# install repo2docker
|
||||||
COPY --from=0 /tmp/wheelhouse /tmp/wheelhouse
|
COPY --from=0 /tmp/wheelhouse /tmp/wheelhouse
|
||||||
RUN pip3 install --no-cache-dir --ignore-installed --no-deps /tmp/wheelhouse/*.whl \
|
RUN pip install --no-cache-dir --ignore-installed --no-deps /tmp/wheelhouse/*.whl \
|
||||||
&& pip3 list
|
&& pip list
|
||||||
|
|
||||||
# add git-credential helper
|
# add git-credential helper
|
||||||
COPY ./docker/git-credential-env /usr/local/bin/git-credential-env
|
COPY ./docker/git-credential-env /usr/local/bin/git-credential-env
|
||||||
|
|
Ładowanie…
Reference in New Issue