Comments (5)
I make this work by setting server sudoers to be NOPASSWD, then when I run sudo , no password needed. After that I can PUT file to somewhere I can put it to then sudo mv
it.
from efs2.
As long as it was password less sudo you could put sudo in RUN CMD sudo whoami
but that doesn't apply to the file uploads.
I'll have to think of a good way to implement this. I believe the way Ansible for example solves this is if a privilege escalation tool is configured (i.e. sudo). They just wrap the commands with sudo
in front (which you can do as shown above). But for file uploads I believe they upload the file into /tmp
as a temporary file and then move it.
You could in theory accomplish the same thing with the below.
PUT daemon.json /var/tmp/daemon.json 0644
RUN CMD sudo mv /var/tmp/daemon.json /etc/docker/daemon.json
But I'll try to think of a good way to implement this within efs2
. It would certainly end up being a "use privilege escalation tool" flag to enable it.
from efs2.
that's cool, man
I like efs2 so much.
If I would like to design such a tool, it should be like this: Simple API for users , just RUN and PUT is a good choice.
from efs2.
Awesome, thanks for that feedback!
from efs2.
After thinking about this some more this can all be done with a combination of PUT and RUN commands along with the use of sudo. Right now Efs2 isn't aware of the target OS type but to support this it would need to be which somewhat makes it more complex. I'm going to close this but won't say there isn't the possibility of doing something like this in the future.
from efs2.
Related Issues (12)
- efs2 does not accept encrypted private keys HOT 11
- Multiline string way of specifying PUT HOT 3
- Recipes repo - efs2-recipes HOT 3
- Brew install HOT 1
- Multiline Shell commands are not supported
- Strategy for linux-dialog style interactive shells (popular with OS installers on raspberry-pi sized devices) HOT 5
- INCLUDE+ feature HOT 2
- Wee --passwd bug HOT 7
- Document RUN SCRIPT HOT 3
- Default config file HOT 1
- why don't make RUN CMD and RUN SCRIPT just be RUN? HOT 4
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 efs2.