SHA256
Addidng Dockerfile for artix devel env and script/example of usage.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
FROM artixlinux/artixlinux:base-dinit
|
||||
|
||||
# Install necessary build tools
|
||||
RUN pacman -Suy --noconfirm base-devel git wget sudo make pacman-contrib
|
||||
|
||||
# Config to use 16 thread for building
|
||||
RUN printf 'MAKEFLAGS="-j16"\n' > /etc/makepkg.conf.d/j16.conf
|
||||
|
||||
# Create a build user
|
||||
RUN useradd -m builduser \
|
||||
&& passwd -d builduser \
|
||||
&& printf 'builduser ALL=(ALL) ALL\n' >> /etc/sudoers
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /home/builduser
|
||||
|
||||
# Build the package as the non-root user
|
||||
# -s: install missing dependencies
|
||||
# -c: clean build directory after successful build
|
||||
# --noconfirm: auto-confirm prompts
|
||||
USER builduser
|
||||
|
||||
# Do NOT copy source code or run makepkg here.
|
||||
# Leave the container ready to accept any mounted directory.
|
||||
CMD ["bash"]
|
||||
|
||||
Reference in New Issue
Block a user