gis-ops / docker-valhalla

This is our flexible Docker repository for the Valhalla routing engine
MIT License
249 stars 71 forks source link

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

Closed conor-nsurely closed 1 year ago

conor-nsurely commented 1 year ago

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!

nilsnolde commented 1 year ago

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