Prevent leaving pip install cache in Docker image (#985)
This commit is contained in:
parent
d022634811
commit
bfd847eaca
@ -98,8 +98,8 @@ ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
|
|||||||
RUN git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \
|
RUN git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \
|
||||||
&& pyenv install $PYTHON_VERSION_V13 \
|
&& pyenv install $PYTHON_VERSION_V13 \
|
||||||
&& pyenv install $PYTHON_VERSION \
|
&& pyenv install $PYTHON_VERSION \
|
||||||
&& PYENV_VERSION=$PYTHON_VERSION_V13 pip install virtualenv \
|
&& PYENV_VERSION=$PYTHON_VERSION_V13 pip install --no-cache-dir virtualenv \
|
||||||
&& PYENV_VERSION=$PYTHON_VERSION pip install virtualenv \
|
&& PYENV_VERSION=$PYTHON_VERSION pip install --no-cache-dir virtualenv \
|
||||||
&& pyenv global $PYTHON_VERSION $PYTHON_VERSION_v13 \
|
&& pyenv global $PYTHON_VERSION $PYTHON_VERSION_v13 \
|
||||||
&& sed -Ei -e '/^([^#]|$)/ {a export PYENV_ROOT="/home/frappe/.pyenv" a export PATH="$PYENV_ROOT/bin:$PATH" a ' -e ':a' -e '$!{n;ba};}' ~/.profile \
|
&& sed -Ei -e '/^([^#]|$)/ {a export PYENV_ROOT="/home/frappe/.pyenv" a export PATH="$PYENV_ROOT/bin:$PATH" a ' -e ':a' -e '$!{n;ba};}' ~/.profile \
|
||||||
&& echo 'eval "$(pyenv init --path)"' >>~/.profile \
|
&& echo 'eval "$(pyenv init --path)"' >>~/.profile \
|
||||||
@ -111,7 +111,7 @@ ENV PATH /home/frappe/.local/bin:$PATH
|
|||||||
# Skip editable-bench warning
|
# Skip editable-bench warning
|
||||||
# https://github.com/frappe/bench/commit/20560c97c4246b2480d7358c722bc9ad13606138
|
# https://github.com/frappe/bench/commit/20560c97c4246b2480d7358c722bc9ad13606138
|
||||||
RUN git clone ${GIT_REPO} --depth 1 -b ${GIT_BRANCH} .bench \
|
RUN git clone ${GIT_REPO} --depth 1 -b ${GIT_BRANCH} .bench \
|
||||||
&& pip install --user -e .bench \
|
&& pip install --no-cache-dir --user -e .bench \
|
||||||
&& echo "export PATH=/home/frappe/.local/bin:\$PATH" >>/home/frappe/.bashrc \
|
&& echo "export PATH=/home/frappe/.local/bin:\$PATH" >>/home/frappe/.bashrc \
|
||||||
&& echo "export BENCH_DEVELOPER=1" >>/home/frappe/.bashrc
|
&& echo "export BENCH_DEVELOPER=1" >>/home/frappe/.bashrc
|
||||||
|
|
||||||
|
@ -15,9 +15,9 @@ RUN mkdir -p /home/frappe/frappe-bench/apps /home/frappe/frappe-bench/logs /home
|
|||||||
WORKDIR /home/frappe/frappe-bench
|
WORKDIR /home/frappe/frappe-bench
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN pip install -U pip wheel \
|
RUN pip install --no-cache-dir -U pip wheel \
|
||||||
&& python -m venv env \
|
&& python -m venv env \
|
||||||
&& env/bin/pip install -U pip wheel
|
&& env/bin/pip install --no-cache-dir -U pip wheel
|
||||||
|
|
||||||
COPY install-app.sh /usr/local/bin/install-app
|
COPY install-app.sh /usr/local/bin/install-app
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user