You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# image name can be for example docker://godlovedc/lolcow
22
22
```
23
23
24
-

24
+

25
25
26
26
### 2. build the image (optional)
27
27
```sh
@@ -31,7 +31,7 @@ $ apptainer build <a name of your choosing>.sif <image name>
31
31
32
32
Building an image is optional for most use cases. In many cases, users can directly run containers pulled from Docker Hub without building a local image.
33
33
34
-

34
+

35
35
36
36
You can now run your container using the built image.
37
37
@@ -49,31 +49,35 @@ Write access is not typically required when running containers. Read-only execut
49
49
50
50
running this would yield a menu for output:
51
51
52
-

52
+

53
53
54
54
#### Enter Container
55
55
```sh
56
56
apptainer shell <image name>.sif
57
57
# after this step, you will be going into the container and start your programming
58
58
```
59
59
60
-

60
+

61
61
62
62
:::tip
63
63
64
-
#### Run commands outside the container
64
+
Run commands outside the container
65
65
66
66
You can run commands for the container using exec arguments without actually going into the container
67
67
68
68
```sh
69
69
$ apptainer exec<image name>.sif <commands>
70
70
# adding commands to the back will return the display result of these commands in the container without actually going into the container
71
71
```
72
+
:::
72
73
73
-
Example:
74
+
### Using fakeroot
74
75
75
-

76
-
:::
76
+
In some cases, you may need elevated permissions inside the container to install software or modify system files. Apptainer provides a `--fakeroot` option that allows you to run commands inside the container with root-like privileges, without requiring actual root access on the system.
0 commit comments