removed apt simulation doing now real apt updates/install

This commit is contained in:
2026-02-15 18:18:30 +01:00
parent bc1e17ec04
commit 34d6707ba3
4 changed files with 13 additions and 41 deletions
+7 -6
View File
@@ -13,7 +13,7 @@ This directory contains everything needed to test the post-installation script i
Provides a reproducible testing environment that allows:
- Running the post-installation script without affecting the host system
- Simulating `apt` installations (safe, no real package changes)
- Real `apt` installations (isolated in container)
- Testing script logic, prompts, and error handling
- Validating syntax and tracing execution
@@ -22,8 +22,8 @@ Provides a reproducible testing environment that allows:
The Dockerfile includes:
- Ubuntu 22.04 base image
- Simulated `sudo` wrapper that runs `apt-get -s install` (simulates installs without making changes)
- Useful utilities: `bash`, `wget`, `tar`, `curl`, `gnupg`, `ca-certificates`, `file`, `procps`
- Passwordless sudo for real apt installations
- Useful utilities: `bash`, `wget`, `tar`, `curl`, `gnupg`, `ca-certificates`, `file`, `procps`, `sudo`
## Usage
@@ -49,12 +49,13 @@ sh 02_start_container_with_image.sh
After container is started an interactive session was started in the container and the script can be started for testing
```bash
sh script.sh
ls -al
sh <scriptName>.sh
```
## Security Notes
- The script is mounted read-only (`:ro` flag) to prevent container from modifying host files
- Container runs with reduced privileges (`--cap-drop ALL --security-opt no-new-privileges`)
- The `sudo` wrapper simulates apt operations, so no packages are actually installed
- All apt installations are real but isolated in the container
- Use `--tmpfs /tmp:rw` for any temporary writes inside the container
- Container is automatically removed after exit (`--rm` flag)