On my own machine (Windows 10, Docker Desktop 2.1.0.3) the build succeeds and runs. On another machine (Ubuntu 18.04, docker CE 19.03.13) the build fails with the error shown.
Why does the build work on one machine but fail another?
dockerfile:
FROM ubuntu:latest AS toolchain
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
g++-5
error:
Package g++-5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
gcc-10-test-results gcc-9-test-results gcc-8-test-results gcc-7-test-results
Package 'g++-5' has no installation candidate
The command '/bin/sh -c apt-get update && apt-get install -y build-essential g++-5' returned a non-zero code: 100