Skip to content

Commit

Permalink
Docs tweaking
Browse files Browse the repository at this point in the history
  • Loading branch information
Colonial-Dev committed Jan 15, 2025
1 parent 0c45cfe commit b035e64
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
7 changes: 5 additions & 2 deletions DEFINITIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Besides the above, Box also polyfills most other directives from the [OCI Contai
- `ENTRYPOINT`
- `ENV`
- `EXPOSE`
- Note that this does *not* alter any runtime behavior - it only applies metadata. Use `CFG args -p=xxxx:yyyy` to ensure ports are actually forwarded at runtime.
- `HEALTHCHECK`
- `LABEL`
- `SHELL`
Expand All @@ -103,7 +104,7 @@ Besides the above, Box also polyfills most other directives from the [OCI Contai

### `CFG`

`CFG` is a catch-all tool used to bake runtime arguments (such as mounts) into an image:
`CFG` is a catch-all tool used to bake runtime arguments (such as mounts)[^1] into an image:

```sh
CFG <FUNCTION> [ARGS...]
Expand Down Expand Up @@ -174,4 +175,6 @@ The harness for `fish`-based definitions includes a function called `trap` that
trap cp
```

This is not included in the POSIX harness, which automatically applies `set -eu` to abort on non-zero exit codes or uses of unset variables.
This is not included in the POSIX harness, which automatically applies `set -eu` to abort on non-zero exit codes or uses of unset variables.

[^1]: If you're wondering "how the hell does it do that" - it saves them as OCI annotations that are read back at creation time. [Did you know you can just use the ASCII separator characters to separate things?](https://github.com/Colonial-Dev/box/blob/0c45cfe2c51a4ff1c3f62b3f753bcfeab882a56b/src/podman.rs#L341-L352) They're right there. Nobody can stop you.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,9 @@ So:
### "Why not just use Kubernetes YAML or `compose`?"
A few reasons:

1. For Box's target use case of "bespoke interactive containers," separating the information on how to *build* the image from information on how to *run* it is lame.
- I am also an avowed [locality of behavior](https://htmx.org/essays/locality-of-behaviour/) enjoyer.
1. For Box's target use case of "bespoke interactive containers," separating the information on how to *build* the image from information on how to *run* it is [lame](https://htmx.org/essays/locality-of-behaviour/).
2. Kubernetes YAML is massively overcomplicated for what I wanted to do, and the `podman` version of `compose` was somewhat buggy when I tried it.
3. YAML is... YAML.
3. YAML is... [yeah](https://github.com/Colonial-Dev/satpaper/blob/b2016c63ffeafc70538fd2b02fa60d1c077fd694/.github/workflows/release.yml#L1-L3).

### "Creating containers (`up`) is extremely slow."

Expand Down
9 changes: 0 additions & 9 deletions src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ use crate::prelude::*;
use crate::podman::*;
use crate::CommandExt;

// For POSIX shells - build a script "on the fly" that sources the init using `source <(bx _init posix)`
// then executes the script in a subshell
// Something like:
//
// source <(bx _init posix)
// (
// # Script contents
// )

pub type Definitions = Vec<Definition>;

#[derive(Debug, Hash, PartialEq, Eq)]
Expand Down

0 comments on commit b035e64

Please sign in to comment.