构建镜像真难,害惨了我。报如下的错误:
#12 54.36 E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true'
#12 54.36 E: Sub-process returned an error code
------
executor failed running [/bin/sh -c set -eux ?&& apt-get update ?&& apt-get install --no-install-recommends --no-install-suggests -y ? ? build-essential postgresql-client libmysqlclient-dev mysql-client python3-pip python3-dev ? ? git libxml2-dev libxslt-dev zlib1g-dev gnupg curl lsb-release libpq-dev dnsutils vim && ? ? apt-get purge --assume-yes --auto-remove --option APT::AutoRemove::RecommendsImportant=false ? ? ?--option APT::AutoRemove::SuggestsImportant=false && rm -rf /var/lib/apt/lists/* /tmp/*]: exit code: 100
?
解决方案:
在执行update之前修改下 此文件: /etc/apt/apt.conf.d/docker-clean文件
RUN sed -i -e 's/^APT/# APT/' -e 's/^DPkg/# DPkg/' /etc/apt/apt.conf.d/docker-clean