-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to shell command #111
Conversation
Currently we only forward `$COLS` and `$ROWS` to `exec`, but we should do the same on `shell`. Also, when you `shell` previosuly we were logging people in as `www-data` which means you can't do things like install new packages. I don't see any issue with using root and giving those caps on `shell` as it's likely you'll be doing stuff like that.
Will this cause wp-cli to complain about being root? |
If there's a user with |
Do the containers even have |
Ah yeah we don't have sudo, that's probably a better route. |
|
inc/composer/class-command.php
Outdated
passthru( sprintf( | ||
'cd %s; VOLUME=%s COMPOSE_PROJECT_NAME=%s docker-compose exec php /bin/bash', | ||
'cd %s; VOLUME=%s COMPOSE_PROJECT_NAME=%s docker-compose exec -e COLUMNS=%d -e LINES=%d -u root php /bin/bash', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove the -u root
and instead make that an additional cli argument 🙏
Do you want to finish this off @joehoyle or shall I? |
Sorry @roborourke I haven't been able to get to this. I still feel like a "normal" shell execution should let you install things etc. Passing How does Chassis behave here? When you get a shell, to you have root permissions? |
No worries! Chassis/vagrant give you a |
Part of this is that Chassis is using a real full Ubuntu install, rather than a stripped back version, so it has sudoers/etc. |
I disagree. "Normal" users aren't privileged and require the use of
Certainly not, but as I live on the command line and will speak for those who do, I would very much appreciate having flags being consistent across tools 🙂 |
Hmm in this case, it seems like having |
If the argument is to maintain consistency with Chassis, then we'd also need to change over from Alpine to Ubuntu. While I would be in favor of that eventually (Canonical has dramatically improved their Docker image), I don't think right now is the time to prioritize that. For right now, |
Agree with @nathanielks there, trying to get meaningful parity with Chassis is going to be really difficult if not impossible. They're completely different environments just with the same services available. I'm not opposed to signing in as root by default but it feels like the exception and not the rule to what you'd be doing on the container as a dev working on a site. Root use is more likely to be for debugging or working on the container itself. Typically I'd just be running CLI commands like I think it's simple enough to just document adding |
OK, I've removed the |
Currently we only forward
$COLS
and$ROWS
toexec
, but we should do the same onshell
. Also, when youshell
previosuly we were logging people in aswww-data
which means you can't do things like install new packages. I don't see any issue with using root and giving those caps onshell
as it's likely you'll be doing stuff like that.