|
1 | | -# Copyright (c) 2019-2021, The Khronos Group Inc. |
| 1 | +# Copyright (c) 2019-2023, The Khronos Group Inc. |
2 | 2 | # |
3 | 3 | # SPDX-License-Identifier: Apache-2.0 |
4 | 4 | # |
|
14 | 14 | # See the License for the specific language governing permissions and |
15 | 15 | # limitations under the License. |
16 | 16 |
|
17 | | -# This is a Docker container for (interactive) OpenXR specification builds |
| 17 | +# This is a Docker container for OpenXR specification builds |
18 | 18 |
|
19 | | -ARG VERSION |
20 | | - |
21 | | -FROM khronosgroup/docker-images:openxr-base.$VERSION |
| 19 | +FROM ruby:2.7-bullseye as builder |
22 | 20 | LABEL maintainer="Ryan Pavlik <ryan.pavlik@collabora.com>" |
23 | 21 |
|
24 | | -# Add the entrypoint to the image |
| 22 | +# Basic spec build and check packages |
| 23 | +RUN env DEBIAN_FRONTEND=noninteractive apt-get update -qq && \ |
| 24 | + env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -qq \ |
| 25 | + bison \ |
| 26 | + build-essential \ |
| 27 | + cmake \ |
| 28 | + flex \ |
| 29 | + fonts-lyx \ |
| 30 | + ghostscript \ |
| 31 | + git \ |
| 32 | + imagemagick \ |
| 33 | + libpango1.0-dev \ |
| 34 | + libreadline-dev \ |
| 35 | + pdftk \ |
| 36 | + poppler-utils \ |
| 37 | + python3 \ |
| 38 | + python3-dev \ |
| 39 | + python3-attr \ |
| 40 | + python3-chardet \ |
| 41 | + python3-lxml \ |
| 42 | + python3-networkx \ |
| 43 | + python3-pillow \ |
| 44 | + python3-pip \ |
| 45 | + python3-requests \ |
| 46 | + python3-setuptools \ |
| 47 | + python3-wheel \ |
| 48 | + wget && \ |
| 49 | + apt-get clean && \ |
| 50 | + rm -rf /var/lib/apt/lists/* |
| 51 | +# Basic gems |
| 52 | +RUN gem install rake asciidoctor coderay json-schema rghost |
| 53 | +# Newer versions break our index customizer, haven't figured out the fix yet. |
| 54 | +RUN gem install asciidoctor-pdf --version 1.6.2 |
| 55 | +RUN MATHEMATICAL_SKIP_STRDUP=1 gem install asciidoctor-mathematical |
| 56 | + |
| 57 | +# Basic pip packages |
| 58 | +RUN python3 -m pip install --no-cache-dir codespell pypdf2 pdoc3 reuse jinja2-cli |
| 59 | + |
| 60 | +# pdf-diff pip package |
| 61 | +RUN python3 -m pip install --no-cache-dir git+https://github.com/rpavlik/pdf-diff |
| 62 | + |
| 63 | +# Second stage: start a simpler image that doesn't have the dev packages |
| 64 | +FROM ruby:2.7-bullseye |
| 65 | + |
| 66 | +# Copy locally-installed gems and python packages |
| 67 | +COPY --from=builder /usr/local/ /usr/local/ |
| 68 | + |
| 69 | +# Runtime-required packages |
| 70 | +RUN env DEBIAN_FRONTEND=noninteractive apt-get update -qq && \ |
| 71 | + env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -qq \ |
| 72 | + clang-format \ |
| 73 | + fonts-lyx \ |
| 74 | + ghostscript \ |
| 75 | + git \ |
| 76 | + git-lfs \ |
| 77 | + gosu \ |
| 78 | + imagemagick \ |
| 79 | + jing \ |
| 80 | + libpango1.0-0 \ |
| 81 | + libxml2-utils \ |
| 82 | + pdftk \ |
| 83 | + poppler-utils \ |
| 84 | + python3 \ |
| 85 | + python3-attr \ |
| 86 | + python3-chardet \ |
| 87 | + python3-lxml \ |
| 88 | + python3-networkx \ |
| 89 | + python3-pillow \ |
| 90 | + python3-pytest \ |
| 91 | + python3-requests \ |
| 92 | + python3-utidylib \ |
| 93 | + python3-venv \ |
| 94 | + trang \ |
| 95 | + wget \ |
| 96 | + xmlstarlet && \ |
| 97 | + apt-get clean |
| 98 | + |
| 99 | +# Add the optional entrypoint to the image |
25 | 100 | COPY entrypoint.openxr.sh /root/entrypoint.openxr.sh |
26 | 101 | RUN chmod +x /root/entrypoint.openxr.sh |
27 | 102 |
|
28 | | -ENTRYPOINT ["/root/entrypoint.openxr.sh"] |
| 103 | +# When running, to start an interactive session, pass: |
| 104 | +# --entrypoint /root/entrypoint.openxr.sh -e "USER_ID=$(id -u)" -e "GROUP_ID=$(id -g)" -v "$MOUNTPOINT:$MOUNTPOINT" -e "CONTAINER_CWD=$MOUNTPOINT" |
0 commit comments