File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -498,13 +498,13 @@ do_install() {
498
498
if ! is_dry_run; then
499
499
set -x
500
500
fi
501
- $sh_c ' apt-get update -qq >/dev/null'
502
- $sh_c " DEBIAN_FRONTEND=noninteractive apt-get install -y -qq $pre_reqs >/dev/null"
501
+ $sh_c ' apt-get -o DPkg::Lock::Timeout=60 update -qq >/dev/null'
502
+ $sh_c " DEBIAN_FRONTEND=noninteractive apt-get -o DPkg::Lock::Timeout=60 install -y -qq $pre_reqs >/dev/null"
503
503
$sh_c ' install -m 0755 -d /etc/apt/keyrings'
504
504
$sh_c " curl -fsSL \" $DOWNLOAD_URL /linux/$lsb_dist /gpg\" -o /etc/apt/keyrings/docker.asc"
505
505
$sh_c " chmod a+r /etc/apt/keyrings/docker.asc"
506
506
$sh_c " echo \" $apt_repo \" > /etc/apt/sources.list.d/docker.list"
507
- $sh_c ' apt-get update -qq >/dev/null'
507
+ $sh_c ' apt-get -o DPkg::Lock::Timeout=60 update -qq >/dev/null'
508
508
)
509
509
pkg_version=" "
510
510
if [ -n " $VERSION " ]; then
@@ -546,7 +546,7 @@ do_install() {
546
546
if ! is_dry_run; then
547
547
set -x
548
548
fi
549
- $sh_c " DEBIAN_FRONTEND=noninteractive apt-get install -y -qq $pkgs >/dev/null"
549
+ $sh_c " DEBIAN_FRONTEND=noninteractive apt-get -o DPkg::Lock::Timeout=60 install -y -qq $pkgs >/dev/null"
550
550
)
551
551
echo_docker_as_nonroot
552
552
exit 0
Original file line number Diff line number Diff line change @@ -127,8 +127,8 @@ checks() {
127
127
128
128
# uidmap dependency check
129
129
if ! command -v newuidmap > /dev/null 2>&1 ; then
130
- if command -v apt-get > /dev/null 2>&1 ; then
131
- INSTRUCTIONS=" apt-get install -y uidmap"
130
+ if command -v apt-get -o DPkg::Lock::Timeout=60 > /dev/null 2>&1 ; then
131
+ INSTRUCTIONS=" apt-get -o DPkg::Lock::Timeout=60 install -y uidmap"
132
132
elif command -v dnf > /dev/null 2>&1 ; then
133
133
INSTRUCTIONS=" dnf install -y shadow-utils"
134
134
elif command -v yum > /dev/null 2>&1 ; then
@@ -142,9 +142,9 @@ yum install -y shadow-utils46-newxidmap"
142
142
143
143
# iptables dependency check
144
144
if [ -z " $SKIP_IPTABLES " ] && ! command -v iptables > /dev/null 2>&1 && [ ! -f /sbin/iptables ] && [ ! -f /usr/sbin/iptables ]; then
145
- if command -v apt-get > /dev/null 2>&1 ; then
145
+ if command -v apt-get -o DPkg::Lock::Timeout=60 > /dev/null 2>&1 ; then
146
146
INSTRUCTIONS=" ${INSTRUCTIONS}
147
- apt-get install -y iptables"
147
+ apt-get -o DPkg::Lock::Timeout=60 install -y iptables"
148
148
elif command -v dnf > /dev/null 2>&1 ; then
149
149
INSTRUCTIONS=" ${INSTRUCTIONS}
150
150
dnf install -y iptables"
You can’t perform that action at this time.
0 commit comments