Coder Social home page Coder Social logo

ivanilves / lstags Goto Github PK

View Code? Open in Web Editor NEW
322.0 11.0 28.0 12.6 MB

Explore Docker registries and manipulate Docker images!

License: Apache License 2.0

Go 90.12% Makefile 5.84% Shell 3.76% Dockerfile 0.27%
docker docker-image docker-registry docker-registry-v2 mesos kubernetes

lstags's People

Contributors

afrimberger avatar cablespaghetti avatar ivanilves avatar jacobstr avatar lukeb2e avatar sfudeus avatar solidnerd avatar vonrabbe avatar zealic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lstags's Issues

"norelease" branches

IMO we need some mechanism to show that the PR we merge should not create a release.

For example, a refactor PR, which should be tested as any other PR, but should not be released cause it provides no value for user.

Add Documentation

Add some basic README.md with utility description and a couple of examples

Filter images by tag (regex)

Something like --filter /^v.*/

  • Maybe applicable multiple times. Connect with and or or (?)
  • Maybe allowing to apply specified filters on selected repos only.

CI: Integration testing

We need integration testing for lstags.

Cases like:

  • Working against public registry
  • Working against private registry
  • Using different types of authentication
  • ...

Pull and push dry-run flag

A pull (-p) dry run would show which images would be pulled.
A push (-P) dry run would show which images would a) be pulled and b) when the -r (external repo flag is given which images would be pushed to it.

This would allow for users to see issues like missing tags in a "plan" phase before running the actual pull/pull and push.

If this is wanted, depending on my time in the next weeks, I would be up to create a PR with this logic implemented.

Kubernetes: Helm chart

Maybe we need to provide Kubernetes chart, some cron job to sync local docker images with registry?

Problem with private registry with port number

Hi, It's a very useful tool. However I found a mismatch problem when our private registry is hosted on a port e.g. 5000. An example as below.

$ docker images
my.registry.com:5000/my_image                 my_tag          abfaa2fbade0        10 months ago       97MB

$ lstags my.registry.com:5000/my_image
<STATE>      <DIGEST>                                      <(local) ID>    <Created At>              <TAG>
LOCAL-ONLY   sha256:85b750cd33aa29ffce453f63984f4f6c9      abfaa2fbade0    2016-11-30T03:37:55-08:00 my.registry.com:5000/my_image:5000/my_image
ABSENT       sha256:85b750cd33aa29ffce453f63984f4f6c9      n/a             2016-11-30T03:37:55-08:00 my.registry.com:5000/my_image:my_tag

It seems the colon before the port number caused the wrong parsing result somewhere.

Thanks!

We need tests

Currently we have no tests, which makes our code a ⏳ πŸ’£

List multiple images

We need to be able to list multiple images. Like:

lstags alpine nginx containers.company.io

Unable to compare local and remote digests

Unable to compare local and remote digests, cause they are always different.

More research required on this topic, as long as w/o solving this issue, the whole lstags idea is useless.

Package tests

We have main.go tested but what about packages?

Could we also have some testing for packages?

CI: Automatic releases

We need automatic releases with our CI.

This means on every merged PR, we will need to:

  • Bump release tag
  • Build binaries for Linux and MacOSX
  • Upload binaries to Dropbox or whatever

`api` package (to be imported by others)

To become a better utility and also to become a package/library we need to separate core logic into a api package, so the main will become really bare and easy to understand. Also other people could include api as a Golang package [not just using CLI] with this.

Todo

  • Provide API PoC #112
  • Provide reliable integration tests for API #119
  • Refactor API to get rid of PoC state #117
  • Provide versioning of API (so developers may develop safely) #114
  • Provide basic API documentation
  • Build a PoC application using v1 lstags API
  • Reach out to the new potential stakeholders

index out of range error

Just trying to get things up and running–

$ lstags --version
VERSION: v30-d15b77b
$ lstags alpine~/^3\\./
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/ivanilves/lstags/docker/config.Load(0x1360289, 0x15, 0x0, 0x0, 0x0)
	/home/travis/gopath/src/github.com/ivanilves/lstags/docker/config/config.go:79 +0x4fe
main.main()
	/home/travis/gopath/src/github.com/ivanilves/lstags/main.go:98 +0x8d

Whitebox End-to-End job

Enforce our blackbox integration testing with a whitebox end2end job which will:

  • start local registry
  • pull image from public registry
  • push it to local registry
  • verify it was pulled/pushed correctly

We may also consider 2 tests one pull and one for pull/push.

Better world: First refactor of the lstags

We have reached the state when we need to:

  • stop adding new functionality for a while.
  • work more on automated testing, code quality and various fixes.
  • add performance, benefit more of concurrency Golang gives us [almost] for free.

TODO

  • Add black-box shell tests for "image pull" functionality.
  • Fix lame ("double"?) help messages.
  • Make registry and operations event more concurrent.
  • Fix authenticated pull.

GIF

Faster CI

Now we have more tests and every CI run is around 5-7min.

We need to take it back to ~2-3min so development will be joyful again! πŸš€

Options include:

  • Parallelize regular & Docker build
  • Run less tests for the PR, more for master merges
  • Speed-up existing tests
  • Remove some existing tests

We need CI

Some simple Travis thing would be enough πŸ˜‰

Elaborare dependency vendoring

Doing it "hard way" like we do it now is stable, but stupid.

Repo became huge: 57mb currently 😱

If we fear remote repo deletion, we should fork all remote repos and point dependencies to our forks.

yaml file support

we need to support configuration loading from yaml file as it is more scm/git friendly

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.