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
Copy file name to clipboardExpand all lines: pages/docs/user-docs/action-bootstrap.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,9 @@ folder: docs
6
6
toc: false
7
7
---
8
8
9
-
>>Note: The bootstrap command is deprecated for Singularity Version 2.4. You should use <ahref="/build"target="_blank">build</a> instead.
9
+
> Note: The bootstrap command is deprecated for Singularity Version 2.4. You should use [build](/build-a-container) instead.
10
10
11
-
Bootstrapping was the original way (for Singularity versions prior to 2.4) to install an operating system and then configure it appropriately for a specified need. Bootstrap is very similar to build, except that it by default uses an <ahref="https://en.wikipedia.org/wiki/Ext3"target="_blank">ext3</a> filesystem and allows for writability. The images unfortunately are not immutable in this way, and can degrade over time. As of 2.4, bootstrap is still supported for Singularity, however we encourage you to use <ahref="/build"target="_blank">build</a> instead.
12
-
13
-
{% include toc.html %}
11
+
Bootstrapping was the original way (for Singularity versions prior to 2.4) to install an operating system and then configure it appropriately for a specified need. Bootstrap is very similar to build, except that it by default uses an <ahref="https://en.wikipedia.org/wiki/Ext3"target="_blank">ext3</a> filesystem and allows for writability. The images unfortunately are not immutable in this way, and can degrade over time. As of 2.4, bootstrap is still supported for Singularity, however we encourage you to use [build](/build-a-container) instead.
Copy file name to clipboardExpand all lines: pages/docs/user-docs/docs-build.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ folder: docs
6
6
toc: false
7
7
---
8
8
9
-
`build` is the "Swiss army knife" of container creation. You can use it to download and assemble existing containers from external resources like [Singularity Hub](https://singularity-hub.org/)and [Docker Hub](https://hub.docker.com/). You can use it to convert containers between the various formats supported by Singularity. And you can use it in conjunction with a [Singularity recipe](/docs-recipes) file to create a container from scratch and customized it to fit your needs.
9
+
`build` is the "Swiss army knife" of container creation. You can use it to download and assemble existing containers from external resources like <ahref="https://www.singularity-hub.org/"target="_blank">Singularity Hub</a> and <ahref="https://hub.docker.com/"target="_blank">Docker Hub</a>. You can use it to convert containers between the various formats supported by Singularity. And you can use it in conjunction with a [Singularity recipe](/docs-recipes) file to create a container from scratch and customized it to fit your needs.
10
10
11
11
{% include toc.html %}
12
12
@@ -67,7 +67,6 @@ Extending the Singularity Hub example from above:
The resulting container is writable, but is still mounted as read-only when executed with commands such as `run`, `exec`, and `shell`. To mount the container as read-write when using these commands add the `--writable` option to them as well.
Copy file name to clipboardExpand all lines: pages/docs/user-docs/docs-docker.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,11 +141,11 @@ Did you know that you can commit this Singularity file to a Github repo and it w
141
141
## How does the runscript work?
142
142
Docker has two commands in the `Dockerfile` that have something to do with execution, `CMD` and `ENTRYPOINT`. The differences are subtle, but the best description I've found is the following:
143
143
144
-
>>A `CMD` is to provide defaults for an executing container.
144
+
> A `CMD` is to provide defaults for an executing container.
145
145
146
146
and
147
147
148
-
>>An `ENTRYPOINT` helps you to configure a container that you can run as an executable.
148
+
> An `ENTRYPOINT` helps you to configure a container that you can run as an executable.
149
149
150
150
Given the definition, the `ENTRYPOINT` is most appropriate for the Singularity `%runscript`, and so using the default bootstrap (whether from a `docker://` endpoint or a `Singularity` spec file) will set the `ENTRYPOINT` variable as the runscript. You can change this behavior by specifying `IncludeCmd: yes` in the Spec file (see below). If you provide any sort of `%runscript` in your Spec file, this overrides anything provided in Docker. In summary, the order of operations is as follows:
151
151
@@ -240,17 +240,18 @@ While most docker images can import and run without a hitch, there are some spec
240
240
### 1. Installation to Root
241
241
When using Docker, you typically run as root, meaning that root's home at `/root` is where things will install given a specification of home. This is fine when you stay in Docker, or if the content at `/root` doesn't need any kind of write access, but generally can lead to a lot of bugs because it is, after all, root's home. This leads us to best practice #1.
242
242
243
-
>> Don't install anything to root's home, `/root`.
243
+
> Don't install anything to root's home, `/root`.
244
244
245
245
### 2. Library Configurations
246
246
The command [ldconfig](https://codeyarns.com/2014/01/14/how-to-add-library-directory-to-ldconfig-cache/) is used to update the shared library cache. If you have software that requires symbolic linking of libraries and you do the installation without updating the cache, then the Singularity image (in read only) will likely give you an error that the library is not found. If you look in the image, the library will exist but the symbolic link will not. This leads us to best practice #2:
247
247
248
-
>> Update the library cache at the end of your Dockerfile with a call to ldconfig.
248
+
> Update the library cache at the end of your Dockerfile with a call to ldconfig.
249
+
249
250
250
251
### 3. Don't install to $HOME or $TMP
251
252
We can assume that the most common Singularity use case has the $USER home being automatically mounted to `$HOME`, and `$TMP` also mounted. Thus, given the potential for some kind of conflict or missing files, for best practice #3 we suggest the following:
252
253
253
-
>> Don't put container valuables in `$TMP` or `$HOME`
254
+
> Don't put container valuables in `$TMP` or `$HOME`
254
255
255
256
256
257
Have any more best practices? Please <ahref="https://www.github.com/singularityware/singularityware.github.io/issues"target="_blank">let us know</a>!
0 commit comments