Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

sudo: The "no new privileges" flag is set, which prevents sudo from running as root. #86

Closed

Description

@conor-nsurely

Hello,

I am using gisops/valhalla:latest to build a container to deploy to GCP Cloudrun. It fails due to this permissions error.
'sudo: The "no new privileges" flag is set, which prevents sudo from running as root.'

The container works locally and on Kubernetes so perhaps this flag is set on the GCP cloudrun side.

My Dockerfile is simply

FROM gisops/valhalla:latest
COPY ./custom_files /custom_files

Attempting to run the container using the root user( As a test to bypass the flag) results in this error.

'ERROR: If you run with custom UID or GID you have to create the mapped directory to the container's /custom_files manually before starting the image'

Does this mean to simply add RUN mkdir custom_files to the Dockerfile and copy the files in there or?

e.g

FROM gisops/valhalla:latest
USER root
RUN mkdir custom_files
COPY ./custom_files /custom_files

Any guidance would be appreciated.

Thanks!

Activity

  1. nilsnolde commented on Mar 6, 2023

    @nilsnolde
    Owner

    Sorry, no idea about vendor-specific quirks. I'll convert this to a discussion as it has little to do with the actual project.

  2. Repository owner locked and limited conversation to collaborators on Mar 6, 2023
  3. converted this issue into a discussion #87 on Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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