forked from VCVRack/rack-plugin-toolchain
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
36 lines (27 loc) · 1.3 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM ghcr.io/qno/rack-plugin-toolchain-ctng-windows:x86_64-w64-mingw32 as ctng-windows
FROM ghcr.io/qno/rack-plugin-toolchain-ctng-linux:x86_64-ubuntu16.04 as ctng-linux
FROM ghcr.io/qno/rack-plugin-toolchain-cppcheck:2.13.0 as cppcheck
FROM ubuntu:22.04
ENV LANG C.UTF-8
ARG JOBS
# Create unprivileged user to build toolchains and plugins
RUN groupadd -g 1000 build
RUN useradd --create-home --uid 1000 --gid 1000 --shell /bin/bash build
# Install make to run make
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends make
# Create toolchain directory
USER build
RUN mkdir -p /home/build/rack-plugin-toolchain
WORKDIR /home/build/rack-plugin-toolchain
COPY --chown=build:build Makefile /home/build/rack-plugin-toolchain/
# Install dependencies for building toolchains and plugins
USER root
RUN make dep-ubuntu
# Clean up files to free up space
RUN rm -rf /var/lib/apt/lists/*
COPY --from=ctng-windows --chown=build:build /home/build/rack-plugin-toolchain/local /home/build/rack-plugin-toolchain/local
COPY --from=ctng-linux --chown=build:build /home/build/rack-plugin-toolchain/local /home/build/rack-plugin-toolchain/local
COPY --from=cppcheck --chown=build:build /home/build/rack-plugin-toolchain/local /home/build/rack-plugin-toolchain/local
USER build
RUN make rack-sdk-all