Skip to content

Commit ff8d247

Browse files
committed
Allow for using docker with macOS
We remove the local debian cache stuff since it doesn't work on a docker container running on a macOS host.
1 parent 32b1145 commit ff8d247

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

bin/make-base-vm

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,21 @@ if [ $DOCKER = "1" ]; then
193193
base_image="$DISTRO:$SUITE"
194194
fi
195195

196+
if [ $(uname) != "Darwin" ]; then
197+
CACHELINE=$(cat << EOF0
198+
RUN echo 'Acquire::http { Proxy "$MIRROR_BASE"; };' > /etc/apt/apt.conf.d/50cacher
199+
EOF0
200+
)
201+
else
202+
# MacOS, no local debian cache
203+
CACHELINE=""
204+
fi
196205
# Generate the dockerfile
197206
cat << EOF > $OUT.Dockerfile
198207
FROM $base_image
199208
200209
ENV DEBIAN_FRONTEND=noninteractive
201-
RUN echo 'Acquire::http { Proxy "$MIRROR_BASE"; };' > /etc/apt/apt.conf.d/50cacher
210+
$CACHELINE
202211
RUN apt-get update && apt-get --no-install-recommends -y install $addpkg
203212
204213
RUN useradd -ms /bin/bash -U $DISTRO

0 commit comments

Comments
 (0)