temporalio / temporalio/temporal

Build docker images with integer UID/GID and use the same one on all images

Open
#3,453 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P1 potential-bug
Dominant language
Go
Stars
23.2k
Forks
1.9k
Avg merge
2d 8h
Merged PRs (30d)
228

Description

Expected Behavior

Be able to deploy in kubernetes in a restricted environment without a lot of work.

Actual Behavior

It's a bit of work.

Steps to Reproduce the Problem

In a restricted world, I need to define some characteristics of the container. Kubernetes can query the image and detect if it runs as non-root, for instance, but not if the UID is a username and not a UID.

My current workaround is more verbose than needed:

securityContext:
  allowPrivilegeEscalation: false
  runAsNonRoot: true
  capabilities:
    drop: ["ALL"]
  seccompProfile:
    type: RuntimeDefault
  runAsUser: 1000
  runAsGroup: 1000

If the UIDs were not 0, I could leave off at least the last two items.

Also, the web container uses 5000 for the temporal user... which is likely an unneeded difference.

Specifications

  • Version: 1.18.0
  • Platform: Any (kubernetes)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the Docker image build definitions for the service and web containers, then compare how their users and groups are created. Done means all images use non-root integer UID/GID values consistently and Kubernetes can run them without explicitly setting runAsUser or runAsGroup.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, kubernetes
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.