File tree Expand file tree Collapse file tree 2 files changed +15
-17
lines changed Expand file tree Collapse file tree 2 files changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,15 @@ Make sure you have Docker installed on your system.
3737 docker build -t arch-iso-builder .
3838 ```
3939
40- 3 . ** Retrieve the ISO** :
40+ 3 . ** Build the ISO in the container**
41+
42+ Build the ISO with this command:
43+
44+ '''bash
45+ docker run --rm --privileged -v $(pwd):/workdir arch-iso-builder bash -c "mkarchiso -v -w workdir/ -o out/ ."
46+ '''
47+
48+ 4 . ** Retrieve the ISO** :
4149
4250 Once the process completes, the ISO will be available in the ` out/ ` directory within your local folder as ` Arch.iso ` .
4351
Original file line number Diff line number Diff line change 1- # Use the official Arch Linux image as the base
21FROM archlinux:latest
32
4- # Update system and install necessary packages
3+ # Install necessary packages
54RUN pacman -Syu --noconfirm && \
65 pacman -S --noconfirm git archiso grub
76
8- # Create a directory for the workspace
7+ # Set the working directory
98WORKDIR /workdir
109
11- # Copy the entire repository into the container
10+ # Copy files into the container
1211COPY . .
1312
14- # Build the Arch ISO
15- RUN mkarchiso -v -w workdir/ -o out/ .
16-
17- # Rename the generated ISO to Arch.iso (if only one ISO is generated)
18- RUN iso_file=$(ls out/*.iso | head -n 1) && \
19- mv $iso_file out/Arch.iso
20-
21- # Set the output directory as a volume so you can retrieve the ISO later
22- VOLUME /workdir/out
23-
24- # The default command just keeps the container running
25- CMD [ "sleep", "infinity" ]
13+ # Instead of running mkarchiso here, we leave it for later execution
14+ # Create an entrypoint or leave it to manual execution
15+ CMD ["/bin/bash"]
You can’t perform that action at this time.
0 commit comments