[build] clear dpkg cache and update sources (#3737)

This change is intended to fix the issue with dpkg-query during build
process.

The symptom is dpkg-query failed to open package info file, usually
/var/lib/dpkg/updates/000?

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
This commit is contained in:
Ying Xie 2019-11-12 07:23:13 -08:00 committed by GitHub
parent 8788f4f783
commit 9871e043ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -256,3 +256,6 @@ RUN add-apt-repository \
RUN apt-get update RUN apt-get update
RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-stretch RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-stretch
RUN echo "DOCKER_OPTS=\"--experimental\"" >> /etc/default/docker RUN echo "DOCKER_OPTS=\"--experimental\"" >> /etc/default/docker
# Cleanup build environment. Please leave this line at the end and add new changes above
RUN dpkg --clear-avail; apt-get update

View File

@ -309,3 +309,6 @@ RUN add-apt-repository \
RUN apt-get update RUN apt-get update
RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-jessie RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-jessie
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker
# Cleanup build environment. Please leave this line at the end and add new changes above
RUN dpkg --clear-avail; apt-get update