Skip to content

Running as a non-root user #641

@achew22

Description

@achew22

I have a build rule in Bazel that brings up an in-memory Postgres server. When running this test, it has to run postgresql's initdb command. postgresql's initdb command has a hardcoded requirement that you can't run as the root user. There doesn't seem to be a flag or hook or configuration option that allows me to execute as another user either in the base image, or in the Cloud Builder yaml.

Affected builder image

gcr.io/cloud-builders/bazel

Expected Behavior

The tests aren't running as the root user

Actual Behavior

The tests are running as the root user

Steps to Reproduce the Problem

  1. Create a cloudbuild.yaml
steps:
- name: gcr.io/cloud-builders/bazel
  entrypoint: whoami
  1. See that it prints out root

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy