Skip to content
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

Allow user to run a image with a specific user at a certain step. #2651

Closed
XhstormR opened this issue Apr 8, 2019 · 3 comments
Closed

Allow user to run a image with a specific user at a certain step. #2651

XhstormR opened this issue Apr 8, 2019 · 3 comments
Milestone

Comments

@XhstormR
Copy link

XhstormR commented Apr 8, 2019

I use Drone CI Service to start gradle image to build software. But gradle image run as gradle user insted of root user by default. However, only the root user has write access in the /drone/src directory. I spent an afternoon trying to solve this problem, finally I switched to openjdk:latest image.

Is there a way to run as specific user with a image in some step, like this:

steps:
- name: build
  user: root #specific user
  image: gradle:latest
  commands:
- ./gradle assemble

This link has more information if you need it.

@tboerger
Copy link

tboerger commented Apr 8, 2019

Because of the permission issues on the shared volume it is so far not supported to switch the user for steps.

@bradrydzewski
Copy link

I think in this case we do need to give an option to override the default USER (non-root) and instruct it to run as root.

@bradrydzewski bradrydzewski added this to the v1.1.0 milestone Apr 11, 2019
@bradrydzewski
Copy link

available in :latest via c338fad

@harness harness locked and limited conversation to collaborators May 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants