Skip to content

Commit f8e9715

Browse files
Merge pull request #338 from Exabyte-io/docs/SOF-7764-3
chore: update the sandbox example
2 parents 58b91d4 + 147c700 commit f8e9715

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

lang/en/docs/cli/actions/add-software.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ interactively. To start it, first initialize a sandbox with `--sandbox` or `-s`
2020
flag:
2121

2222
```bash
23-
apptainer build --sandbox qe_sandbox/ docker://almalinux:9
23+
apptainer build --sandbox gcc_sandbox/ docker://almalinux:9
2424
```
2525

2626
The above command will extract the entire Linux OS tree (`/bin`, `/etc`, `/usr`)
27-
from the AlmaLinux 9 Docker image to a subdirectory named `qe_sandbox`.
27+
from the AlmaLinux 9 Docker image to a subdirectory named `gcc_sandbox`.
2828

2929
Now, to install packages and save them to the sandbox folder, we can enter into
3030
the container in shell (interactive) mode with write permission (use
3131
`--writable` or `-w` flag). We will also need `--fakeroot` or `-f` flag to
3232
install software as root inside the container:
3333

3434
```bash
35-
apptainer shell --writable --fakeroot qe_sandbox/
35+
apptainer shell --writable --fakeroot gcc_sandbox/
3636
```
3737

3838
Once inside the Apptainer shell, we can install packages and run commands
@@ -52,15 +52,20 @@ everything you need, `exit` from the Apptainer shell mode.
5252

5353
We may either package the sandbox directory into a final image:
5454
```bash
55-
apptainer build -f espresso.sif qe_sandbox/
55+
apptainer build -f gcc.sif gcc_sandbox/
56+
```
57+
58+
We can verify that our container is working with:
59+
```bash
60+
apptainer exec gcc.sif gcc --version
5661
```
5762

5863
After the container is built and saved as an SIF image, we may delete our
5964
sandbox folder. We need to set appropriate permissions to be able to delete:
6065

6166
```bash
62-
chmod -R u+rwX qe_sandbox
63-
rm -rf qe_sandbox
67+
chmod -R u+rwX gcc_sandbox
68+
rm -rf gcc_sandbox
6469
```
6570

6671
### Build from a definition file

0 commit comments

Comments
 (0)