chainguard-dev / melange

build APKs from source code
Apache License 2.0
411 stars 95 forks source link

You don't have write permissions for the /usr/lib/ruby/gems/3.1.0 directory #422

Open rawlingsj opened 1 year ago

rawlingsj commented 1 year ago

I'm trying to build wolfi os logstash using melange natively on M1 mac but getting an error

⚠️  aarch64   | ERROR:  While executing gem ... (Gem::FilePermissionError)
⚠️  aarch64   |     You don't have write permissions for the /usr/lib/ruby/gems/3.1.0 directory.
⚠️  aarch64   |     /usr/lib/ruby/3.1.0/rubygems/installer.rb:712:in `verify_gem_home'

My build command uses the latest melange built from HEAD today

USE_CACHE=no MELANGE=melange make packages/logstash  BUILDWORLD=no
kaniini commented 1 year ago

This is intentional. As we move towards unprivileged builds, the Docker runner is already running unprivileged. So you can only write to "/home/build" and the image outside it is read-only under Docker.