Skip to content

Create user to run in Workspace Docker image

What does this MR do and why?

Follows up from !4363 (merged).

Something I notice when I use a terminal in a workspace using the image as it currently is that I seem to be user 5001, rather than the user that set up the image in the first place. That made me wonder if we need to follow some of: https://docs.gitlab.com/ee/user/workspace/create_image.html.

So I've se up a user with ID 5001 so that we can install asdf for them and run some processes as them. They'll own the files we install and have their environment set up.

One additional thing might be that the terminal in a workspace seems to default to sh rather than bash, but we could look into that in a follow up.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Check out this branch.
  2. Run docker buildx build --file dockerfiles/gitlab-docs-workspace.Dockerfile . --build-arg ASDF_VERSION="0.13.1".
  3. Run docker run -ti --rm <image ID> bash.
  4. Run make compile in the running Docker image.

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Evan Read

Merge request reports