You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
1.5KB

  1. FROM ubuntu:24.04
  2. ENV LANG=C.UTF-8
  3. ARG JOBS
  4. ARG MACOS_SDK_VERSION
  5. # Install make and sudo to bootstrap
  6. ENV DEBIAN_FRONTEND=noninteractive
  7. RUN apt-get update && apt-get install -y --no-install-recommends \
  8. make \
  9. sudo \
  10. ca-certificates \
  11. git \
  12. build-essential \
  13. autoconf \
  14. automake \
  15. bison \
  16. flex \
  17. gawk \
  18. libtool-bin \
  19. libncurses5-dev \
  20. unzip \
  21. zip \
  22. jq \
  23. libgl-dev \
  24. libglu-dev \
  25. git \
  26. wget \
  27. curl \
  28. cmake \
  29. nasm \
  30. xz-utils \
  31. file \
  32. python3 \
  33. libxml2-dev \
  34. libssl-dev \
  35. texinfo \
  36. help2man \
  37. libz-dev \
  38. rsync \
  39. xxd \
  40. perl \
  41. coreutils \
  42. zstd \
  43. markdown \
  44. libarchive-tools \
  45. gettext \
  46. libgmp-dev \
  47. libmpfr-dev
  48. RUN echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
  49. # Create unprivileged user to build toolchains and plugins
  50. RUN useradd --non-unique --create-home --uid 1000 --gid 1000 --shell /bin/bash build
  51. RUN usermod -aG sudo build
  52. # Switch user from root
  53. USER build
  54. # Create toolchain directory
  55. RUN mkdir -p /home/build/rack-plugin-toolchain
  56. WORKDIR /home/build/rack-plugin-toolchain
  57. COPY Makefile /home/build/rack-plugin-toolchain/
  58. # Clean up files to free up space
  59. USER root
  60. RUN rm -rf /var/lib/apt/lists/*
  61. USER build
  62. COPY MacOSX${MACOS_SDK_VERSION}.sdk.tar.* /home/build/rack-plugin-toolchain/
  63. # Build toolchains
  64. RUN JOBS=$JOBS make toolchain-mac
  65. RUN JOBS=$JOBS make toolchain-win
  66. RUN JOBS=$JOBS make toolchain-lin
  67. RUN JOBS=$JOBS make cppcheck
  68. RUN JOBS=$JOBS make rack-sdk-all
  69. RUN rm MacOSX12.3.sdk.tar.*