When building the devcontainer from source on arm macOS, we get arm
Ubuntu, for which we don't have a prebuild mozjs version. That triggers
a compilation from source, which fails, due to issues finding String.h.
I can't confirm this, but it might be because the mounted workspace is
case-insensitive. We definitly don't want that, so just make sure that
the cargo target directory is in a named volume. That also has the
advantage that we don't clobber the hosts target dir and still persist.
Testing: Manually tested on macOS.
Fixes: ./mach build in a devcontainer built from source on arm64 macOS.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Follow-up to #43131.
Testing: Tested locally. Note: This only works for x86_64 based systems.
Arm Linux users will need to build from source, but building in the
devcontainer on arm linux is anyway not working currently.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Rename the dockerfile and add a dockerignore. This reduces the size of
the build-context greatly.
Renaming is a preparation for later adding more possible dockerfiles
(e.g. fedora based etc).
We choose the filename based `.dockerignore` files over a
`.dockerignore` in the root folder mainly to reduce clutter in the root
folder.
This addresses the problem of large build context raised on zulip by
@glyn.
Testing: Manually tested by building the image locally.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Switch to using our own dockerfile, and install the required
dependencies into our image.
In follow-ups we can build the docker image in CI, so that users can
download a prebuilt docker image to save time.
Testing: Manually tested by opening servo in the devcontainer and
running `./mach build`
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
The devcontainer configuration makes it easier for users to setup a
working environment, by using docker / podman and a devcontainer IDE
plugin (or the CLI).
Testing: Manually tested the configuration in VS code on linux.
Fixes: #40469
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>