update docs
This commit is contained in:
parent
ecafdb6381
commit
77166ffd72
36
README.md
36
README.md
@ -1,12 +1,10 @@
|
|||||||
# alpine-cli
|
# alpine-cli
|
||||||
|
|
||||||
A minimal image for running Linux CLI utilities - shell scripts and similar.
|
A minimal image for running Linux CLI utilities - shell scripts and similar.
|
||||||
This is useful for both interactive purposes or as the basis for other utility
|
This is useful for interactive purposes or as the basis for other utility
|
||||||
images.
|
images.
|
||||||
|
|
||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker run -ti --rm ghcr.io/jswank/alpine-cli
|
$ docker run -ti --rm ghcr.io/jswank/alpine-cli
|
||||||
~ $ ^D
|
~ $ ^D
|
||||||
@ -17,26 +15,33 @@ $ bin/cli
|
|||||||
exit
|
exit
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## More Info
|
## More Info
|
||||||
|
|
||||||
The image is based on *alpine:edge*, with a small amount of additional setup/installation done. See
|
The image is based on *alpine:3*, with a small amount of additional
|
||||||
the [Dockerfile](Dockerfile) and [ctx/](ctx) for the specifics.
|
setup/installation done. See the [Dockerfile](Dockerfile) and [ctx/home](ctx)
|
||||||
|
for the specifics.
|
||||||
|
|
||||||
- Some basic utilities are installed for interative and script-based shell usage
|
- Some basic utilities are installed for interative and script-based shell usage
|
||||||
- A user is created with sudo (`-u root`) access.
|
- A user is created with sudo (`-u root`) access.
|
||||||
- A few personal preferences are enabled via dotfiles.
|
- A few personal preferences are enabled via dotfiles.
|
||||||
|
|
||||||
A helper script, using [casey/just](https://github.com/casey/just') is in [bin/cli](bin/cli).
|
A helper script, using [casey/just](https://github.com/casey/just') is in
|
||||||
It can be used to quickly start an ephemeral (or persistent) container.
|
[bin/cli](bin/cli). It can be used to quickly start an ephemeral (or
|
||||||
|
persistent) container.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ bin/cli --list
|
$ bin/cli help
|
||||||
|
|
||||||
Available recipes:
|
Available recipes:
|
||||||
clean # remove the persistent image
|
clean # Remove the persistent container
|
||||||
default # run
|
default # Invoke the 'run' recipe
|
||||||
persist # run (or attach to) a perisent container {{n}}
|
help recipe="help" # Display this listing. Detailed help is available with 'help recipe_name'.
|
||||||
run # run a temporary container based on {{image}}
|
persist # Run (or attach to) a persistent container
|
||||||
|
pull # Pull the latest version of the image
|
||||||
|
restart # Remove a running container, and run the default recipe
|
||||||
|
run # Run an ephemeral container.
|
||||||
|
save i=image # Save the running container as a new image
|
||||||
|
|
||||||
|
|
||||||
$ bin/cli
|
$ bin/cli
|
||||||
~ $ ^D
|
~ $ ^D
|
||||||
@ -47,7 +52,7 @@ $ bin/cli persist
|
|||||||
~ $
|
~ $
|
||||||
exit
|
exit
|
||||||
|
|
||||||
$ podman cp foo.json cli:/home/cli
|
$ podman cp foo.json cli:/home/cli # copy a file to the persistent container
|
||||||
|
|
||||||
$ bin/cli persist
|
$ bin/cli persist
|
||||||
~ $ ls
|
~ $ ls
|
||||||
@ -61,3 +66,6 @@ Bonus - the same script could be used to start other containers:
|
|||||||
$ bin/cli image=alpine:edge
|
$ bin/cli image=alpine:edge
|
||||||
/ # ^D
|
/ # ^D
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
MIT
|
||||||
|
|||||||
2
bin/cli
2
bin/cli
@ -33,7 +33,7 @@ persist:
|
|||||||
podman run -ti --userns=keep-id --name {{n}} {{image}}
|
podman run -ti --userns=keep-id --name {{n}} {{image}}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Pull the latest version of the container
|
# Pull the latest version of the image
|
||||||
@pull:
|
@pull:
|
||||||
podman pull {{image}} >/dev/null 2>&1
|
podman pull {{image}} >/dev/null 2>&1
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user