What is a Builder Image?
A "builder image" is a Docker image which contains all the necessary components to build
a Slice application. Although it requires you to install and become slightly familiar with
Docker, it completely eliminates the need to manually install all third-party libraries,
compilers, etc. and also makes updates to the latest Slice version trivial, since all you
have to do is pull the latest builder image, instead of having to manually install the
updated library and header files.
Image Tags
Windows:
registry.gitlab.com/rsethc/slice/slice-builder-windows:master
Ubuntu 20.04 "Focal":
registry.gitlab.com/rsethc/slice/slice-builder-ubuntu:master
Builder images for other platforms can be added upon request.
Although under normal circumstances you should stick to using the builder image from the
master branch, you can use a different name if you're chasing improvements that are
actively being developed in
other branches,
just beware that there is no guarantee whatsoever that any builder image in the
container registry
for a side branch is stable or complete whatsoever, and by habitually using
a builder image from a side branch you risk missing out on features, performance
improvements, and stability fixes if the branch is behind
master or
stops having images being built for it (for example, if the branch stops being
updated because it has already been merged into
master).
Explanation
To build your application, use a Dockerfile, starting with FROM (the image tag).
Next, after making sure you have set your WORKDIR to /game, COPY in your
source code, and RUN the commands to build your application into /game/built.
Finally, you'll probably want to RUN a command such as zip or tar to create
an archive of /game/built, and retrieve this file in some way, such as uploading it
to artifact storage via curl, or on the host, docker copying the archive out of
a container temporarily created from the built image.
Example
Windows is Special
To keep things simple, the Windows builder image is based on Ubuntu rather than a Windows
base image. The benefit is that build scripts, etc. can be exclusively written for Linux.