docker build fails on one machine but succeeds on another
The problem seems to be that the ubuntu:latest image is stale.
Changing to ubuntu:bionic fixes the issue:
FROM ubuntu:bionic AS toolchain
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update &amp;&amp; apt-get install -y \
  build-essential \
  g++-5

I don't know why an old image is being used, but that seems like a separate question.