Git Product home page Git Product logo

Comments (9)

themalkolm avatar themalkolm commented on May 11, 2024 1

I can also draw parallels between homebrew and whalebrew i.e.

whalebrew install ...
whalebrew use
whalebrew list
brew install ...
brew switch ...
brew list

I can see how it is useful to have switch command as this way I can keep last release and current master (head) version and switch between them whenever I need.

from whalebrew.

bfirsh avatar bfirsh commented on May 11, 2024

Thanks for the kind words! This sounds great.

A few thoughts:

  1. Do you think we could just use the standard tag format? This should already work now. e.g. whalebrew install whalebrew/packer:12.2

  2. I wonder if install and use could be the same thing...

     $ whalebrew install whalebrew/packer:12.2
     Looks like you already have packer:12.1 installed as /usr/local/bin/packer.
     Would you like to change it to packer:12.2?
    
  3. There is some conflation of package name and image name which is a bit confusing, and is already a bit confusing in the current UI. We need to think really carefully about how tags are represented -- whether they're attached to the image or the package, how we differentiate between local tags and tags on Docker Hub, etc etc.

I think making it easy to install tags and switch between them is a quick, easy win. How we make those discoverable is a bit harder, and we can probably just use the Docker Hub page to list tags for now.

from whalebrew.

LongLiveCHIEF avatar LongLiveCHIEF commented on May 11, 2024

Do you think we could just use the standard tag format? This should already work now. e.g. whalebrew install whalebrew/packer:12.2

Yes. Makes it easier to imply how to use them.

This should already work now. e.g. whalebrew install whalebrew/packer:12.2

Yeah, I figured that out right after I opened the issue, and tinkered with re-installing new tags, running into the same error you did.

There is some conflation of package name and image name which is a bit confusing, and is already a bit confusing in the current UI. We need to think really carefully about how tags are represented -- whether they're attached to the image or the package, how we differentiate between local tags and tags on Docker Hub, etc etc.

Your points are very valid. I have to admit, I only have ideas on how to make this work at this point, because I've been thinking through this for months, when I was planning on writing Dockerbin. You're further along, so I choose to contribute here instead.

Proposal

We could manage this in a way similar to how nvm, dvm, and rvm do things. The Initial installation doesn't go directly to /usr/local/bin, but to a a library folder of some kind, with a tree structure based on the image tags.

Then we can have a list of alias commands that actually execute the correct binary, and the /usr/local/bin/imagename is symlinked to whatever tag has the latest|default.

When you run the whalebrew use imagename:tag, it just switches the symlink to a different alias for that session.

from whalebrew.

bfirsh avatar bfirsh commented on May 11, 2024

I don't think all that complexity is necessary. The reason those packaging systems work like that is they're referencing real things on file systems.

The Whalebrew package is just a reference to a Docker image, so we can leverage Docker's image system to do all the hard work:

  • To switch to a different version, we can just update the tag in the package YAML and pull the tag if it doesn't exist
  • To list what tags are available, just list the tags on Docker Hub. We can do something even simpler here to start with by just linking to the page on Docker Hub, and not even bother with a CLI.

from whalebrew.

bfirsh avatar bfirsh commented on May 11, 2024

I think a switch command would be useful, but not urgent. You can replicate this behaviour by swapping tags in the YAML file, which we could document in the meantime.

If it were implemented, I think switch should just swap tags in the YAML file though -- symlinking things is unnecessary.

from whalebrew.

themalkolm avatar themalkolm commented on May 11, 2024

Yep, so I suggest an easy way to alter YAML file to cover even more cases i.e. #39

from whalebrew.

terev avatar terev commented on May 11, 2024

@bfirsh I've implemented a portion of this idea in #92

from whalebrew.

terev avatar terev commented on May 11, 2024

we can probably mark todos 1 and 2 done in the original issue now that my change is merged

from whalebrew.

andrewcrook avatar andrewcrook commented on May 11, 2024

could this be extended to Docker platform emulation #138 where you can select amd64 Linux to run on ARM64 and vice versa?

I suggested each package having a meta file of different platforms and versions which could be used with a DockerFile template to create a new DockerFile in order to build the required image.

from whalebrew.

Related Issues (20)

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.