Closed fernandoneto closed 9 years ago
you can setup a sudoers file with NOPASSWD for strider user and it shouldnt try to ask for a password interactively anymore as it will already be authorized
@keyvanfatehi can you be more verbose please?
sure -- i'm saying that I think you can prevent the tty askpass stuff from happening (without having to remove sudo from your makefiles) by creating your own Docker image with sudoers correctly configured. e.g.:
root ALL=(ALL) ALL
strider ALL=(ALL) NOPASSWD: ALL
Defaults env_reset
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
FROM strider/strider-docker-slave
USER root
ADD /sudoers.txt /etc/sudoers
RUN chmod 440 /etc/sudoers
USER strider
@keyvanfatehi Shouldn't this be a option of Strider-CD/strider-docker-runner ?
@cusspvz the image used by strider-docker-runner, https://github.com/Strider-CD/strider-docker-slave, is designed to provide the bare minimum of requirements to make the docker runner possible. users are to extend this image using Docker semantics (FROM strider/strider-docker-slave) and configure the strider-docker-runner to use that image instead.
Do you think this is something that should be in the base image? Perhaps -- but someone needs to test it and pull request if it's the right solution. Unfortunately I don't have a project right now that places me in that context.
@fernandoneto it would be nice to hear back from you to see what you ended up doing.
I understand your point.
If i was Project Manager on Strider i wouldn't put strider user as a sudoers on minimal slave, but i think that you could maintain images as runtime options
for other users, perhaps we won't need it since we got our own stacked on top of strider/strider-docker-slave
, but i think it is a great idea to supply resources for those who are trying Strider :)
By the way, @fernandoneto made a PR into our slave container findhit/strider-docker-findhit#1 .
Thank you for helping him :)
Yup we're working on making strider ecosystem more accessible in one of the PR's (plugin manager). Thanks, glad you guys got sorted out, enjoy Strider!
Hi,
I'm running strider-docker-slave, and all work great but in one of my repository i need to run a punch of commands from a
MAKEFILE
with sudo. He stops in the first command that have sudo. The error is this.sudo: no tty present and no askpass program specified
any suggestions how to fix this? @niallo @jaredlyBest regards