This is the output of fastlane env command when I run with Jenkins.
SDK and fastlane setup is in Docker Container.
[09:11:28]: [33mGet started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile[0m
`/` is not writable.
Bundler will use `/tmp/bundler20200228-96-c24ujz96' as your home directory temporarily.
/usr/lib/ruby/2.5.0/fileutils.rb:232:in `mkdir': [31m[!] Permission denied @ dir_s_mkdir - /.fastlane[0m (Errno::EACCES)
from /usr/lib/ruby/2.5.0/fileutils.rb:232:in `fu_mkdir'
from /usr/lib/ruby/2.5.0/fileutils.rb:210:in `block (2 levels) in mkdir_p'
from /usr/lib/ruby/2.5.0/fileutils.rb:208:in `reverse_each'
from /usr/lib/ruby/2.5.0/fileutils.rb:208:in `block in mkdir_p'
from /usr/lib/ruby/2.5.0/fileutils.rb:193:in `each'
from /usr/lib/ruby/2.5.0/fileutils.rb:193:in `mkdir_p'
from /var/lib/gems/2.5.0/gems/fastlane-2.141.0/fastlane_core/lib/fastlane_core/module.rb:28:in `fastlane_user_dir'
from /var/lib/gems/2.5.0/gems/fastlane-2.141.0/fastlane_core/lib/fastlane_core/analytics/analytics_session.rb:58:in `did_show_message?'
from /var/lib/gems/2.5.0/gems/fastlane-2.141.0/fastlane_core/lib/fastlane_core/analytics/analytics_session.rb:22:in `action_launched'
from /var/lib/gems/2.5.0/gems/fastlane-2.141.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:74:in `run!'
from /var/lib/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
from /var/lib/gems/2.5.0/gems/fastlane-2.141.0/fastlane/lib/fastlane/commands_generator.rb:349:in `run'
from /var/lib/gems/2.5.0/gems/fastlane-2.141.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
from /var/lib/gems/2.5.0/gems/fastlane-2.141.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
from /var/lib/gems/2.5.0/gems/fastlane-2.141.0/bin/fastlane:23:in `<top (required)>'
from /usr/local/bin/fastlane:23:in `load'
from /usr/local/bin/fastlane:23:in `<main>'
Try to set the following env vars in your Dockerfile:
GEM_HOME=/bundle
ENV BUNDLE_PATH $GEM_HOME
ENV BUNDLE_APP_CONFIG=$BUNDLE_PATH \
BUNDLE_BIN=$BUNDLE_PATH/bin
ENV PATH $BUNDLE_BIN:$PATH
Then when you run bundle
it should use the correct directory to install into.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With