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.

42 lines
1.0KB

  1. FROM ubuntu:24.04
  2. ENV LANG C.UTF-8
  3. ARG JOBS
  4. # Install make and sudo to bootstrap
  5. ENV DEBIAN_FRONTEND=noninteractive
  6. RUN apt-get update && apt-get install -y --no-install-recommends make sudo
  7. RUN echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
  8. # Create unprivileged user to build toolchains and plugins
  9. RUN useradd --non-unique --create-home --uid 1000 --gid 1000 --shell /bin/bash build
  10. RUN usermod -aG sudo build
  11. # Switch user from root
  12. USER build
  13. # Create toolchain directory
  14. RUN mkdir -p /home/build/rack-plugin-toolchain
  15. WORKDIR /home/build/rack-plugin-toolchain
  16. COPY Makefile /home/build/rack-plugin-toolchain/
  17. # Install dependencies for building toolchains and plugins
  18. RUN make dep-ubuntu
  19. # Clean up files to free up space
  20. USER root
  21. RUN rm -rf /var/lib/apt/lists/*
  22. USER build
  23. COPY MacOSX11.1.sdk.tar.* /home/build/rack-plugin-toolchain/
  24. # Build toolchains
  25. RUN JOBS=$JOBS make toolchain-mac
  26. RUN JOBS=$JOBS make toolchain-win
  27. RUN JOBS=$JOBS make toolchain-lin
  28. RUN JOBS=$JOBS make cppcheck
  29. RUN rm MacOSX11.1.sdk.tar.*