Go to file
2024-06-17 22:31:53 -04:00
bin .build.yml: add git tag to sources 2024-06-10 22:25:23 -04:00
ctx add openvi, .local/bin 2023-11-19 22:11:28 -05:00
.build.yml install just into build environment 2024-06-17 22:31:53 -04:00
.gitignore cleanup 2023-03-16 12:21:36 -04:00
Dockerfile .build.yml: add git tag to sources 2024-06-10 22:25:23 -04:00
justfile revert sr.ht builds to just+image rather than task+manifest 2024-06-17 22:28:09 -04:00
LICENSE initial revision 2023-02-27 13:33:28 -05:00
NOTICE initial revision 2023-02-27 13:33:28 -05:00
README.md .build.yml: add git tag to sources 2024-06-10 22:25:23 -04:00
Taskfile.yml try task + build 2024-06-10 22:20:47 -04:00

alpine-cli

A minimal image for running Linux CLI utilities - shell scripts and similar. This is useful for interactive purposes or as the basis for other utility images.

Quickstart

$ docker run -ti --rm ghcr.io/jswank/alpine-cli
~ $ ^D
exit

$ bin/cli
~ $ ^D
exit

More Info

The image is based on alpine:3, with a small amount of additional setup/installation done. See the Dockerfile and ctx/home for the specifics.

  • Some basic utilities are installed for interative and script-based shell usage
  • A user is created with sudo (-u root) access.
  • A few personal preferences are enabled via dotfiles.

Available Images

See ghcr.io/jswank/alpine-cli for current available images.

Helper Script

A helper script, using casey/just is in bin/cli. It can be used to quickly start an ephemeral (or persistent) container.

$ bin/cli help

Available recipes:
    clean              # Remove the persistent container
    default            # Invoke the 'run' recipe
    help recipe="help" # Display this listing. Detailed help is available with 'help recipe_name'.
    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
~ $ ^D
exit

$ bin/cli persist
~ $ ls
~ $ 
exit

$ podman cp foo.json cli:/home/cli  # copy a file to the persistent container

$ bin/cli persist
~ $ ls
foo.json
~ $ ^D
exit

Bonus - the same script could be used to start other containers:

$ bin/cli image=alpine:3
/ # ^D

License

MIT