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.
- 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
dockerandnerdctl
You will need one of the following container run times;
If available in Hex, the package can be installed
by adding pots to your list of dependencies in mix.exs:
def deps do
[
{:pots, "~> 0.1.0"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/pots.
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 runmix pot.new
mix pot.run
This will start the container. It defaults to
-d(detached mode). You may also pass in-ifor interactive mode. Be aware, all containers are started with--rmso they will be discarded once shut down.
mix pot.clean
This will remove files, images, and containers created by Pots. You may pass
--filesto remove Dockerfiles,--imagesto remove images, and--containersto stop (and remove) containers.
mix pot.info
This will simply output information about the files/images/containers generated by pots using your container runtime.