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.