Skip to content

Commit 4fd5e97

Browse files
committed
updated metadata page
1 parent bd3128b commit 4fd5e97

2 files changed

Lines changed: 30 additions & 17 deletions

File tree

_data/sidebars/user_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ entries:
2727
url: /docs-recipes
2828
output: web, pdf
2929

30-
- title: Build an Image
30+
- title: Build a Container
3131
url: /docs-build
3232
output: web, pdf
3333

pages/docs/user-docs/docs-environment-metadata.md

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,34 @@ The `inspect` command is useful for viewing labels and other container meta-data
100100

101101
## Container Metadata
102102

103-
If you want to look at the environment inside a container, you can look inside the metadata env folder as follows:
104-
105-
```
106-
singularity exec centos7.img ls /.singularity.d/env
107-
01-base.sh 10-docker.sh 99-environment.sh
108-
```
109-
110-
The variables in `01-base.sh` are a set of defaults set upon container creation, and the `10-docker.sh` come from a Docker import.
111-
112-
```
113-
singularity exec centos7.img cat /.singularity.d/env/10-docker.sh
114-
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
115-
```
116-
117-
118-
103+
Inside of the container, metadata is stored in the `/.singularity.d` directory. Here is an example of the contents:
104+
105+
```
106+
/.singularity.d/
107+
├── actions
108+
│ ├── exec
109+
│ ├── run
110+
│ ├── shell
111+
│ ├── start
112+
│ └── test
113+
├── env
114+
│ ├── 01-base.sh
115+
│ ├── 90-environment.sh
116+
│ ├── 95-apps.sh
117+
│ └── 99-base.sh
118+
├── labels.json
119+
├── libs
120+
├── runscript
121+
├── Singularity
122+
└── startscript
123+
```
124+
125+
- **actions**: This directory contains helper scripts to allow the container to carry out the action commands.
126+
- **env**: All *.sh files in this directory are sourced in alpha-numeric order when the container is initiated. For legacy purposes there is a symbolic link called `/environment` that points to `/.singularity.d/env/90-environment.sh`.
127+
- **labels.json**: The json file that stores a containers labels described above.
128+
- **libs**: At runtime the user may request some host-system libraries to be mapped into the container (with the `--nv` option for example). If so, this is their destination.
129+
- **runscript**: The commands in this file will be executed when the container is invoked with the `run` command or called as an executable. For legacy purposes there is a symbolic link called `/singularity` that points to this file
130+
- **Singularity**: This is the Recipe file that was used to generate the container. If more than 1 Recipe file was used to generate the conainer additional Singularity files will appear in numeric order in a sub-directory called `bootstrap_history`
131+
- **startscript**: The commands in this file will be executed when the container is invoked with the `instance.start` command.
119132

120133
{% include links.html %}

0 commit comments

Comments
 (0)