Warning
The Distribution now maintains a separate library for parsing Docker image references: github.com/distribution/reference.
It is recommended to use that library instead of this one.
This project is archived.
A library for parsing Docker image references.
This library is extracted from the distribution project (from this commit).
It's sole purpose is to allow parsing Docker image references without having to import the entire distribution project with all of its dependencies.
go get github.com/sagikazarmark/docker-ref
For an optimal developer experience, it is recommended to install Nix and direnv.
Run the test suite:
just test
There are some existing solutions out there, but I decided it's easier if I just fork the repo myself.
- https://github.com/novln/docker-parser
- https://github.com/containers/image/tree/8c387a14f4ac95fb4aa0569e8e31439f988bc941/docker/reference
The project is licensed under the Apache 2.0 License.