:image |
-
-
- {
-
-
} |
-
-||||||||||
:cmd |
-
- .echo |
+ ||||||||||
:args |
+
- (
-
|
+
.cat
+ }
diff --git a/docs/bassics.html b/docs/bassics.html index 220e8433..aac8c721 100644 --- a/docs/bassics.html +++ b/docs/bassics.html @@ -188,61 +188,77 @@
:*dir*
<host: /tmp/bass-scope4273504418>
<host: /tmp/nix-shell.bIClkG/bass-scope1071463021>
:*dir*
<host: /tmp/bass-scope3776207272>
<host: /tmp/nix-shell.bIClkG/bass-scope3135943297>
A serializable object representing a command to run in a controlled environment.
+A location of a file or directory within a filesystem.
+Bass distinguishes between file and directory paths by requiring a trailing slash (/
) for directories.
{
:image |
-
-
- {
-
-
} |
-
-||||||||||
:cmd |
-
- .echo |
+ ||||||||||
:args |
+
- (
-
|
+
.cat
+ }
A file or directory path relative to a directory on the host machine, called the context dir.
The only way to obtain a host path is through *dir*
, which is set by Bass when loading a module.
*dir*
+
<host: /tmp/nix-shell.bIClkG/bass-scope3900852916>
Throughout this documentation, thunks will be rendered as space invaders to make them easier to identify.
-Thunks are run by the runtime with run
or read
. Files created by thunks can be referenced by thunk paths.
A thunk that doesn't specify an image will be interpreted as a native Bass thunk which can be use
d or load
ed in addition to being run
.
Host paths can be passed into thunks with copy-on-write semantics.
+=> resolve image config for docker.io/library/alpine@sha256:686d8c9dfa6f3ccfc8230bc3178d23f84eeaf7e457f36f271ab1acc53015037c [0.10s]=> local:///tmp/nix-shell.bIClkG/bass-scope3900852916 [0.46s]-> transferring /tmp/nix-shell.bIClkG/bass-scope3900852916: 2B [0.00s]=> docker-image://docker.io/library/alpine@sha256:686d8c9dfa6f3ccfc8230bc3178d23f84eeaf7e457f36f271ab1acc53015037c CACHED [0.10s]-> resolve docker.io/library/alpine@sha256:686d8c9dfa6f3ccfc8230bc3178d23f84eeaf7e457f36f271ab1acc53015037c [0.34s]=> copy / / [0.21s]=> ls <host: /tmp/nix-shell.bIClkG/bass-scope3900852916> [0.89s]
null
+ A controlled environment for a thunk's command to run in. A thunk's image determines the runtime that is used to run it.
-Concretely, a thunk's image is either a scope specifying a reference to an OCI image, or a parent thunk to chain from.
-To reference an image in a registry, use the linux
path root - which uses resolve
under the hood to resolve a repository name and tag to a precise digest.
(linux/alpine)
-
{
:platform |
-
-
- {
-
-
} |
-
-||
:repository |
-
- "alpine" |
-
-||
:tag |
-
- "latest" |
-
-||
:digest |
-
- "sha256:686d8c9dfa6f3ccfc8230bc3178d23f84eeaf7e457f36f271ab1acc53015037c" |
-
-
}
To use an image with a thunk, use from
or with-image
:
A serializable object representing a command to run in a controlled environment.
[(from (linux/alpine)
- ($ echo "Hello, world!"))
- (with-image
- ($ echo "Hello, world!")
- (linux/alpine))
- (-> ($ echo "Hello, world!")
- (with-image (linux/alpine)))
-]
+
(
:repository
"alpine"
:platform
:repository
"alpine"
Throughout this documentation, thunks will be rendered as space invaders to make them easier to identify.
+Thunks are run by the runtime with run
or read
. Files created by thunks can be referenced by thunk paths.
A thunk that doesn't specify an image will be interpreted as a native Bass thunk which can be use
d or load
ed in addition to being run
.
(.git (linux/alpine/git))
+