Comments (6)
Hi! sorry I missed this one.
can I ask you how is whalebrew /usr/local/bin/rush --version
working?
from whalebrew.
Same thing. But when running sudo whalebrew
, it works.
$ whalebrew /usr/local/bin/rush --version
bash: /usr/local/bin/rush: Permission denied
$ sudo whalebrew /usr/local/bin/rush --version
0.5.8
$ ls -l /usr/local/bin/{whale,rush}*
-rwxr-xr-x 1 root root 64 Oct 16 13:59 /usr/local/bin/rush
-rwxrwxrwx 1 root root 15958371 Oct 16 13:44 /usr/local/bin/whalebrew
Note that I am testing it with whalebrew 0.2.3, since 0.2.4 does not work.
from whalebrew.
ok, I think I understand what is happening
When you run a package, whalebrew will, by default, add the -u $(id -u):$(id -g)
fo files are mounted and executed as the standard user.
I am not familiar with rush at all but it looks like it does not support to be run as a different user than the one it is built for in the container.
For this, whalebrew has an option to keep the same user as in the image: LABEL io.whalebrew.config.keep_container_user 'true'
You can also edit your /usr/local/bin/rush
and add the option keep_container_user: true
in a new line.
in other words, your /usr/local/bin/rush
should look like
#!/usr/bin/env whalebrew
image: dannyben/rush
working_dir: /app
keep_container_user: true
This will have the effect to disable the default option to keep the current user ID:
Line 78 in 3158fcd
from whalebrew.
I don' understand - why are you modifying container users in the first place?
I thought the entire mandate of whalebrew was to provide alternative to
alias rush="docker run -it --rm dannyben/rush"
If it runs with "docker run..." it should run with whalebrew.
from whalebrew.
The purpose of running as user is to solve the problem of writing to files.
The purpose of whalebrew is to provide a package manager
like Homebrew, but with Docker images
When you install any package on your system, later, when you run the command as any user, you expect the command to be run as your user. Here Whalebrew has, by default, the same behaviour.
A large proportion of the packages actually needs to access and write files on the filesystem, which, in case this flag is not set, issues like #40 or #11 . There are though, as you pointed, some packages for which the user ID they set is important. They are, from my experience, mostly packages that does not need to access the file system. For those, whalebrew has the keep_container_user
flag described above.
from whalebrew.
Thanks. I am closing this.
For my needs, any of the below two approaches is probably more suitable:
alias rush="docker run -it --rm dannyben/rush"
or, to create a file /usr/local/bin/rush
#!/usr/bin/env bash
docker run -it --rm dannyben/rush
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.