Define a docker-entrypoint.sh that checks for the environment variables INTERFACES.
If INTERFACES is set to "universal" then we do the following:
- If the universal/RIncludes directory is not empty, assume that the Universal
interfaces are already installed. Call interfaces-and-libraries.sh to link
the Universal interfaces instead of the default multiversal interfaces.
- Otherwise check the INTERFACESFILE environment variable to locate a suitable
Macbinary DiskCopy image of MPW-GM.img.bin containing the
"Interfaces&Libraries" directory, which can be a path within the container
image itself or an external URL. If the file is a URL then download it first,
then decompress the file using ConvertDiskImage and then use the in-built
hfsutils to extract the relevant files under /tmp/InterfacesAndLibraries.
Finally call interfaces-and-libraries.sh to link the Universal interfaces
instead of the default multiversal interfaces.
Otherwise use the multiversal interfaces which are included by default.
This release image contains the basic toolchain that can be used for building
projects without having to build Retro68 locally, including integration into a
CI pipeline.
This has two main advantages: firstly it means that the Dockerfile is being tested
as part of the pipeline when changes are merged into master, and secondly it allows
testing of Linux builds without requiring a separate job for Docker that can consume
even more CI minutes.
In order to test the container image it is necessary to manually start the build
image using docker run, execute the tests, and then copy the results back to the
host ready for publishing.
Note that since the base OS image is now handled by docker we can switch the host
to use the 'ubuntu-latest' image rather than the older 'ubuntu-20.04' image.
Use the docker multi-stage build functionality to perform the Retro68 build in a
temporary build image, and then copy the final build directory into a fresh
release image. This reduces the final release image size from 9.2GB to 2.6GB.
Update Dockerfile to use Ubuntu 20.04 and the updated package list from
azure-pipelines.yml. Also explicitly include the g++ package into the container
without which configure will error out with a 'configure: error: C++ preprocessor
"/lib/cpp" fails sanity check' error.
Following the instructions as is on macOS results in `build-toolchain.bash` failing with `WARNING: 'makeinfo' is missing on your system`. The readme was updated in #59 but only for Ubuntu.