hashicorp / hashicorp/nomad

Specify user in nomad alloc exec

Open
#24,686 1 comment 3 reactions 0 assignees View on GitHub
hcc/jira stage/accepted theme/allocation API type/enhancement
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

### Proposal

docker exec -it -u root abc123 bash

The above docker command allows you to override any 'USER' command specified in the Dockerfile and run bash as root.

There does not seem to be any way to override this user with 'nomad alloc exec'.

### Use-cases

This is a useful feature when debugging/troubleshooting some allocations where the operator needs to act as root for a given allocation.

### Attempted Solutions

So an operator can work around this limitation by logging into the Nomad client that is running the allocation and from there they can docker exec -it -u root cba321 bash

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the nomad alloc exec entry point and trace how the command selects the execution user for Docker allocations. Compare the existing behavior with the requested root override, then verify that an operator can specify a user when running an allocation command.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.