-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdockerfile
More file actions
28 lines (20 loc) · 807 Bytes
/
dockerfile
File metadata and controls
28 lines (20 loc) · 807 Bytes
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
# Base image
FROM archlinux:latest
# Install necessary packages
RUN pacman -Syu --noconfirm \
&& pacman -S --noconfirm sudo git base-devel
# Create a non-root user for security purposes
RUN useradd -m -s /bin/bash builder \
&& echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# Set the user to builder
USER builder
# Define /workspace as a volume
VOLUME /home/runner/work/StratOS-repo
# Change the working directory to /workspace
WORKDIR /home/runner/work/StratOS-repo
# Copy the build.sh script to the container
COPY --chown=builder:builder build.sh /home/runner/work/StratOS-repo/build.sh
# Give execute permission to build.sh
RUN chmod +x /home/runner/work/StratOS-repo/build.sh
# Default command to execute when the container starts
CMD ["/home/runner/work/StratOS-repo/build.sh"]