@@ -20,19 +20,19 @@ interactively. To start it, first initialize a sandbox with `--sandbox` or `-s`
2020flag:
2121
2222``` bash
23- apptainer build --sandbox qe_sandbox / docker://almalinux:9
23+ apptainer build --sandbox gcc_sandbox / docker://almalinux:9
2424```
2525
2626The 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
2929Now, to install packages and save them to the sandbox folder, we can enter into
3030the container in shell (interactive) mode with write permission (use
3131` --writable ` or ` -w ` flag). We will also need ` --fakeroot ` or ` -f ` flag to
3232install 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
3838Once 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
5353We 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
5863After the container is built and saved as an SIF image, we may delete our
5964sandbox 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