Comments (9)
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.
Thanks for the kind words! This sounds great.
A few thoughts:
-
Do you think we could just use the standard tag format? This should already work now. e.g.
whalebrew install whalebrew/packer:12.2
-
I wonder if
install
anduse
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?
-
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.
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.
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.
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.
Yep, so I suggest an easy way to alter YAML file to cover even more cases i.e. #39
from whalebrew.
@bfirsh I've implemented a portion of this idea in #92
from whalebrew.
we can probably mark todos 1 and 2 done in the original issue now that my change is merged
from whalebrew.
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)
- Immediate failure for `whalebrew search` on macOS Mojave with whalebrew 0.2.5 HOT 3
- Validate `io.whalebrew.*` labels HOT 1
- Make it work as non-admin HOT 3
- Ensure plain support of OCI images
- Add search support for Harbour docker registry
- Add search support for AWS docker registry
- Add search support for GCP docker registry
- whalebrew search does not list packages HOT 2
- Option to run a package without `-it` HOT 3
- terraform outdated HOT 5
- [Ideas] Apple Silicon (ARM64) Docker bitfmt support in Whalebrew HOT 5
- Broken uninstall (on brew version) HOT 3
- Warning for most packages on m1 macs HOT 1
- Improve Install Path handling HOT 3
- Was 0.4.0 re-tagged? HOT 4
- Is the docker daemon running? (Oh yes it is!) HOT 11
- podman support HOT 12
- Homebrew version of whalebrew is incorrect HOT 4
- open /usr/local/bin/whalesay: permission denied
- Use `brew --prefix`'/bin' install path by default
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whalebrew.