Skip to content

Commit ed49275

Browse files
taylorsilvaRui Yang
andcommitted
update os package layers when building images
Signed-off-by: Taylor Silva <tsilva@pivotal.io> Co-authored-by: Rui Yang <ruiya@vmware.com>
1 parent 7bae67b commit ed49275

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

dockerfiles/alpine/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ RUN set -e; \
2222

2323
# stage: resource
2424
FROM ${base_image} AS resource
25+
RUN apk update && apk upgrade
2526
RUN apk --no-cache add \
2627
bash \
2728
docker \

dockerfiles/ubuntu/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ RUN set -e; \
2323
# stage: resource
2424
FROM ${base_image} AS resource
2525

26+
RUN apt update && apt upgrade -y -o Dpkg::Options::="--force-confdef"
2627
# docker hosts their own packages, this steps sets up the repo for apt-get
27-
RUN apt-get update; \
28-
apt-get install -y --no-install-recommends \
28+
RUN apt update; \
29+
apt install -y --no-install-recommends \
2930
apt-transport-https \
3031
ca-certificates \
3132
curl \
@@ -37,7 +38,7 @@ RUN apt-get update; \
3738
$(lsb_release -cs) \
3839
stable";
3940

40-
RUN apt-get update && apt-get install -y --no-install-recommends \
41+
RUN apt update && apt install -y --no-install-recommends \
4142
docker-ce \
4243
jq \
4344
ca-certificates \

0 commit comments

Comments
 (0)