Skip to content

Commit e3c2cb0

Browse files
authored
Merge pull request #32 from henktillman/master
Update create-image documentation to reflect removal of sparse image …
2 parents cb2914c + ae0e490 commit e3c2cb0

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

pages/docs/user-docs/docs-create-an-image.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permalink: create-image
55
folder: docs
66
---
77

8-
Singularity images are single files which physically contain the container. Singularity images are 'sparse' files in that they start off with a giant hole and thus it does not consume disk space until you fill the hole (e.g. a 1GiB image may start off only taking about 30MiB of physical disk space). As you fill the image by installing files, data, and programs into it you will find it increase in size.
8+
Singularity images are single files which physically contain the container.
99

1010
The effect of all files existing virtually within a single image greatly simplifies sharing, copying, branching, and other management tasks. It also means that standard file system ACLs apply to access and permission to the container (e.g. I can give read only access to a colleague, or block access completely with a simple chmod command).
1111

@@ -15,26 +15,27 @@ Singularity will create a default container image of 1GiB using the following co
1515

1616
```bash
1717
$ sudo singularity create container.img
18-
Creating a sparse image with a maximum size of 1024MiB...
19-
Formatting image (/sbin/mkfs.ext4)
20-
Done. Image can be found at: container.img
18+
Creating a new image with a maximum size of 768MiB...
19+
Executing image create helper
20+
Formatting image with ext3 file system
21+
Done.
2122
```
2223

2324
We can now use the command `ls` to look at the files and permissions of the container:
2425

2526
```bash
2627
$ ls -l container.img
27-
-rwxr-xr-x. 1 root root 1073741856 Jun 1 08:27 container.img
28+
-rwxr-xr-x. 1 root root 805306399 Jun 1 08:27 container.img
2829
```
2930

3031
How big is it?
3132

3233
```bash
3334
$ du -sh container.img
34-
33M container.img
35+
769M container.img
3536
```
3637

37-
Here we created a new container image called `container.img` in the current directory. You can see the the `ls` command reports it is 1GiB in size, but when checking the actual disk usage, it reports only 33MiB. As we add files to the image, its actual disk usage will increase.
38+
Here we created a new container image called `container.img` in the current directory.
3839

3940
Also, notice the permissions of the container image as it is executable. This is important in that Singularity images can be executed directly (as long as Singularity is installed on the host system).
4041

0 commit comments

Comments
 (0)