Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dontlaugh/oils-container
YSH and OSH shells in a container
https://github.com/dontlaugh/oils-container
oils osh shell ysh
Last synced: about 1 month ago
JSON representation
YSH and OSH shells in a container
- Host: GitHub
- URL: https://github.com/dontlaugh/oils-container
- Owner: dontlaugh
- Created: 2024-07-27T17:07:09.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-07-27T21:18:36.000Z (5 months ago)
- Last Synced: 2024-07-28T20:49:00.501Z (5 months ago)
- Topics: oils, osh, shell, ysh
- Language: Shell
- Homepage: https://quay.io/repository/chroot.club/oils
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# oils-container
[![Container Repository on Quay](https://quay.io/repository/chroot.club/oils/status "Container Repository on Quay")](https://quay.io/repository/chroot.club/oils)
YSH and OSH shells in a container
## Build
Install `buildah` and `podman`.
Available releases are listed at https://www.oilshell.org/releases.html
Choose a release version, its checksum, and set a tag for your image.
```sh
version="0.22.0"
checksum="7ad64ad951faa9b8fd310fc17df0a93291e041ab75311aca1bc85cbbfa7ad45f"
image_tag="quay.io/chroot.club/oils:v${version}-debian"
```Run the following command.
```sh
buildah unshare ./container.sh $version $checksum $image_tag
```Or do this if you have `ysh` on your workstation.
```sh
buildah unshare ./container.ysh $version $checksum $image_tag
```An `unshare` session is required, because our container.sh script
mounts the root filesystems of two working containers. This operation
would require root privileges otherwise. See `man buildah-unshare`.## Usage
Oils is actually two shells
* `osh` - a new POSIX-compatible shell implementation to run your existing scripts
* `ysh` - a brand new shell language with better defaults, structured
data types, and moreCurrently, both shells are implemented by the `oils-for-unix` binary, and are
invoked via symlinks. The language (YSH or OSH) is chosen at runtime based on
whether `ysh` or `osh` is invoked.Anyway, do one of these.
```
podman run --rm quay.io/chroot.club/oils:v0.22.0-debian osh -c 'echo hi from a POSIX shell'
podman run --rm quay.io/chroot.club/oils:v0.22.0-debian ysh -c '
var wow = { native: ["json", "support"] }
echo "omg a new shell with"
json write (wow)
'
```