README.md

# Pots

Some wrapper functionality around generating Dockerfiles and managing them
for an elixir project. This project is still very much in the early stages
so use at your own risk. 

**ATTENTION**: While this has been written to support `docker`, `podman`, and `nerdctl`
it has only been tested with `podman` currently. Test the other two is still a
TODO.

## TODO

- [ ] Generate some kind of configuration for Pots.
- [ ] Allow selection of container runtime in config.
- [ ] Provide better defaults for the Dockerfile.
- [ ] Config options for how the containers are run. (e.g. a list of flags such as `--rm`, `-it`, ect.)
- [ ] Test with both `docker` and `nerdctl` 

## Requirements

You will need one of the following container run times;
- [Docker](https://www.docker.com/get-started/)
- [Podman](https://podman.io/)
- [Nerdctl (containerd)](https://github.com/containerd/nerdctl)

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `pots` to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [
    {:pots, "~> 0.1.0"}
  ]
end
```

Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at <https://hexdocs.pm/pots>.


## Tasks

`mix pot.new`
> This task will generate a Dockerfile to be used by Pots. This
> is just a regular Dockerfile so you don't have to run it
> specifically using Pots.

`mix pot.build`
> This will build the Dockerfile generated from `mix pot.new`. If
> you haven't generated a file yet it will run `mix pot.new`

`mix pot.run`
> This will start the container. It defaults to `-d` (detached mode).
> You may also pass in `-i` for interactive mode. Be aware, all containers
> are started with `--rm` so they will be discarded once shut down.

`mix pot.clean`
> This will remove files, images, and containers created by Pots.
> You may pass `--files` to remove Dockerfiles, `--images` to remove
> images, and `--containers` to stop (and remove) containers. 

`mix pot.info`
> This will simply output information about the files/images/containers
> generated by pots using your container runtime.