Go to file
2023-12-10 01:06:24 +00:00
bin update docs 2023-05-01 14:35:18 -04:00
ctx/home use ~/.local/bin as local path 2023-11-08 11:41:37 -05:00
.build.yml revert tag definition 2023-12-10 01:03:39 +00:00
.gitignore cleanup 2023-03-16 12:21:36 -04:00
Dockerfile Update Dockerfile 2023-12-10 01:05:23 +00:00
justfile justfile: add support for build flags 2023-05-16 18:27:00 -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 doc: add info re: current images, ad a toc 2023-05-09 11:56:30 -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:3
~ $ ^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:edge
/ # ^D

License

MIT