Commit Graph

11 Commits

Author SHA1 Message Date
Mark Cave-Ayland
9facdaf3c1 Dockerfile: update Ubuntu base image from 20.04 to 22.04
The current CI build for Linux fails with the following error:

2791.4 Scanning dependencies of target ResourceFiles
2791.4 [ 68%] Building CXX object ResourceFiles/CMakeFiles/ResourceFiles.dir/ResourceFork.cc.o
2791.4 [ 69%] Building CXX object ResourceFiles/CMakeFiles/ResourceFiles.dir/BinaryIO.cc.o
2791.4 [ 69%] Building CXX object ResourceFiles/CMakeFiles/ResourceFiles.dir/ResType.cc.o
2791.4 [ 70%] Building CXX object ResourceFiles/CMakeFiles/ResourceFiles.dir/ResourceFile.cc.o
------
Dockerfile:21
--------------------
  20 |
  21 | >>> RUN mkdir /Retro68-build && \
  22 | >>>     mkdir /Retro68-build/bin && \
  23 | >>>     bash -c "cd /Retro68-build && bash /Retro68/build-toolchain.bash"

Looking back through the logs there is no sign of any specific error, however
the CI history indicates that the problem was introduced via commit e187bd21c2
("honor SOURCE_DATE_EPOCH variable when timestamping MacBinary files").

A bit of searching suggests a couple of possible reasons as to why commit e187bd21c2
could introduce a build failure: 1) the version of gcc being used may have a
buggy/incomplete implementation of std::chrono or 2) a bug in the version of cmake.

On this basis updating the Ubuntu base image from 20.04 (old LTS) to 22.04 (current
LTS) should resolve these issues, and indeed with this change applied I can
successfully build the container image from current Retro68 git as well as one of
the sample applications.
2024-01-23 20:55:56 +00:00
Mark Cave-Ayland
6931631adc Dockerfile: add logic for optional install Universal interfaces on startup
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.
2023-12-17 21:13:01 +00:00
Mark Cave-Ayland
4042463991 Dockerfile: add macutils and interfaces-and-libraries.sh to image
These files will be required in order to download and install the Universal
Interfaces within the created image.
2023-12-17 20:11:54 +00:00
Wolfgang Thaller
01bccd3d35 remove test image from Dockerfile, link to repo 2023-12-16 22:49:02 +01:00
Wolfgang Thaller
1d8f4f6774 test setup for docker 2023-12-16 16:27:50 +01:00
Mark Cave-Ayland
d8e2780f8d Dockerfile: add toolchain bin directory to the default PATH
This allows the Retro68 compilers to be executed regardless of the current
working directory which is set to /root by default.
2023-12-16 12:59:53 +01:00
Mark Cave-Ayland
86a16a78cf Dockerfile: add git package to the image
This enables code to be checked out from within the running container as is
typically used by CI runners.
2023-12-16 12:59:53 +01:00
Mark Cave-Ayland
bde1485a9e Dockerfile: only copy the build directory artifacts into the final release 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.
2023-12-16 12:59:53 +01:00
Mark Cave-Ayland
0649693436 Dockerfile: bring build up to date with that in azure-pipelines.yml
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.
2023-12-16 12:59:53 +01:00
Steve Salevan
921ff11ddb Adjusting Dockerfile to support clean builds 2018-08-14 22:02:47 -04:00
Wolfgang Thaller
270cafaab4 improve LaunchAPPL 2017-10-02 09:21:55 +02:00