Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion .github/workflows/dockerfile-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,38 @@ jobs:
run: |
set -e # Exit immediately if a command exits with a non-zero status
docker build -t arch-iso-builder . || { echo "Docker build failed"; exit 1; }
docker run --rm --privileged -v "$(pwd)":/workdir arch-iso-builder bash -c "mkarchiso -v -w workdir/ -o out/ ." || { echo "ISO creation failed"; exit 1; }

- name: Verify ISO
run: |
set -e # Exit immediately if a command exits with a non-zero status
cd out/

# Check if ISO exists
iso_count=$(ls -1 *.iso 2>/dev/null | wc -l)
if [ $iso_count -eq 0 ]; then
echo '::error::No ISO file found'
exit 1
elif [ $iso_count -gt 1 ]; then
echo '::error::Multiple ISO files found'
exit 1
fi

iso_file=$(ls *.iso)

# Check ISO size (minimum 500MB)
size=$(stat -c%s "$iso_file")
if [ $size -lt 524288000 ]; then
echo "::error::ISO file too small: $((size / 1024 / 1024))MB"
exit 1
fi

# Verify ISO checksum
sha256sum "$iso_file" > checksum.sha256
sha256sum -c checksum.sha256 || {
echo '::error::ISO checksum verification failed'
exit 1
}

# Generate additional checksums
md5sum "$iso_file" > checksum.md5
sha1sum "$iso_file" > checksum.sha1
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ To install Docker, follow the instructions for your operating system:

3. **Build the ISO in the container**:

Build the ISO with this command:
The Dockerfile now includes the `mkarchiso` command to automate the ISO build process. Simply run the container to build the ISO:

```bash
docker run --rm --privileged -v $(pwd):/workdir arch-iso-builder bash -c "mkarchiso -v -w workdir/ -o out/ ."
docker run --rm --privileged -v $(pwd):/workdir arch-iso-builder
```

4. **Retrieve the ISO**:
Expand Down
4 changes: 3 additions & 1 deletion dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ WORKDIR /workdir
# Copy files into the container
COPY . .

# Instead of running mkarchiso here, we leave it for later execution
# Run mkarchiso to build the ISO
RUN mkarchiso -v -w /workdir/workdir -o /workdir/out .

# Create an entrypoint or leave it to manual execution
CMD ["/bin/bash"]
Loading