Install Discourse for development using Docker

I’m getting a different error on d/boot_dev --init. This is on a fresh install of Ubuntu 22.04 and following the guide in the OP

EDIT: Solved – it really doesn’t like being run as root. Make sure you are a normal user from the get go.

# d/boot_dev --init
Using source in: /root/dev/discourse
Using data in:   /root/dev/discourse/data/postgres
release: Pulling from discourse/discourse_dev
214ca5fb9032: Pull complete 
37cd9d4cd9e6: Pull complete 
9b38588fc778: Pull complete 
cb13139046fe: Pull complete 
1243de3fe752: Pull complete 
ec3e5331f9b3: Pull complete 
0fab0821518d: Pull complete 
9b5e686bba91: Pull complete 
428573951790: Pull complete 
38013f421bac: Pull complete 
733b166992df: Pull complete 
1fb3d7e57e63: Pull complete 
f76a1270a527: Pull complete 
133993b18ebe: Pull complete 
226b3b82cab1: Pull complete 
Digest: sha256:0a08c79cd8997e3bfac037625f2f5b2f26a64564113116b8c18969484b00a8ce
Status: Downloaded newer image for discourse/discourse_dev:release
docker.io/discourse/discourse_dev:release
439f53088cc4aab844a8864b779056a576c731ba4723d4cf8b23d0e97c8ae79c
Installing gems...
^TFollowing files may not be writable, so sudo is needed:
  /usr/local/bin
  /usr/local/lib/ruby/gems/2.7.0
  /usr/local/lib/ruby/gems/2.7.0/build_info
  /usr/local/lib/ruby/gems/2.7.0/cache
  /usr/local/lib/ruby/gems/2.7.0/doc
  /usr/local/lib/ruby/gems/2.7.0/extensions
  /usr/local/lib/ruby/gems/2.7.0/gems
  /usr/local/lib/ruby/gems/2.7.0/plugins
  /usr/local/lib/ruby/gems/2.7.0/specifications
Using rake 13.0.6
Using concurrent-ruby 1.1.10
Using i18n 1.10.0
Using minitest 5.15.0
Using tzinfo 2.0.4
Using activesupport 7.0.3
Using builder 3.2.4
Using erubi 1.10.0
Using racc 1.6.0
Using nokogiri 1.13.6 (x86_64-linux)
Using rails-dom-testing 2.0.3
Using crass 1.0.6
Using loofah 2.18.0
Using rails-html-sanitizer 1.4.2
Using actionview 7.0.3
Using rack 2.2.3
Using rack-test 1.1.0
Using actionpack 7.0.3
Using globalid 1.0.0
Using activejob 7.0.3
Using mini_mime 1.1.2
Using mail 2.8.0.edge from https://github.com/discourse/mail.git
Using digest 3.1.0
Using timeout 0.2.0
Using net-protocol 0.1.3
Using strscan 3.0.3
Using net-imap 0.2.3
Using net-pop 0.1.1
Using net-smtp 0.3.1
Using actionmailer 7.0.3
Using actionview_precompiler 0.2.3
Using activemodel 7.0.3
Using active_model_serializers 0.8.4
Using activerecord 7.0.3
Using public_suffix 4.0.7
Using addressable 2.8.0
Using annotate 3.2.0
Using ast 2.4.2
Using aws-eventstream 1.2.0
Using aws-partitions 1.583.0
Using aws-sigv4 1.5.0
Using jmespath 1.6.1
Using aws-sdk-core 3.130.2
Using aws-sdk-kms 1.56.0
Using aws-sdk-s3 1.114.0
Using aws-sdk-sns 1.53.0
Using ember-source 2.18.2
Using execjs 2.8.1
Using barber 0.12.2
Using coderay 1.1.3
Using better_errors 2.9.1
Using debug_inspector 1.1.0
Using binding_of_caller 1.0.0
Using msgpack 1.5.1
Using bootsnap 1.11.1
Using uniform_notifier 1.16.0
Using bullet 7.0.1
Using bundler 2.3.13
Using byebug 11.1.3
Using cbor 0.5.9.6
Using certified 1.0.0
Using chunky_png 1.4.0
Using colored2 3.1.2
Using connection_pool 2.2.5
Using ipaddr 1.2.4
Using openssl 2.2.1
Using openssl-signature_algorithm 1.1.1
Using cose 1.2.0
Using cppjieba_rb 0.4.2
Using rexml 3.2.5
Using crack 0.4.5
Using css_parser 1.11.0
Using diff-lcs 1.5.0
Using diffy 3.4.0
Using ember-data-source 3.0.2
Using sprockets 3.7.2
Using ember-handlebars-template 0.8.0
Using method_source 1.0.0
Using thor 1.2.1
Using zeitwerk 2.5.4
Using railties 7.0.3
Using jquery-rails 4.4.0
Using discourse-ember-rails 0.18.6
Using discourse-ember-source 3.12.2.3
Using discourse-fonts 0.0.9
Using faker 2.21.0
Using literate_randomizer 0.4.0
Using discourse_dev_assets 0.0.4
Using docile 1.4.0
Using regexp_parser 2.4.0
Using ecma-re-validator 0.4.0
Using email_reply_trimmer 0.1.13
Using excon 0.92.3
Using exifr 1.3.9
Using fabrication 2.28.0
Using fakeweb 1.3.0
Using faraday-em_http 1.0.0
Using faraday-em_synchrony 1.0.0
Using faraday-excon 1.1.0
Using faraday-httpclient 1.0.1
Using multipart-post 2.1.1
Using faraday-multipart 1.0.3
Using faraday-net_http 1.0.1
Using faraday-net_http_persistent 1.2.0
Using faraday-patron 1.0.0
Using faraday-rack 1.0.0
Using faraday-retry 1.0.3
Using ruby2_keywords 0.0.5
Using faraday 1.10.0
Using fast_blank 1.0.1
Using fast_xs 0.8.0
Using fastimage 2.2.6
Using ffi 1.15.5
Using fspath 3.1.2
Using gc_tracer 1.5.1
Using guess_html_encoding 0.0.11
Using hana 1.3.7
Using hashdiff 1.0.1
Using hashie 5.0.0
Using highline 2.0.3
Using hkdf 0.3.0
Using htmlentities 4.3.4
Using http_accept_language 2.1.1
Using image_size 3.0.1
Using in_threads 1.6.0
Using progress 3.6.0
Using image_optim 0.31.1
Using json 2.6.1
Using json-schema 2.8.1
Using uri_template 0.7.0
Using json_schemer 0.2.21
Using jwt 2.3.0
Using kgio 2.11.4
Using libv8-node 16.10.0.0 (x86_64-linux)
Using rb-fsevent 0.11.1
Using rb-inotify 0.10.1
Using listen 3.7.1
Using request_store 1.5.1
Using lograge 0.12.0
Using logstash-event 1.2.02
Using logstash-logger 0.26.1
Using logster 2.11.2
Using lru_redux 1.1.0
Using lz4-ruby 0.3.3
Using maxminddb 0.1.22
Using memory_profiler 1.0.0
Using message_bus 4.2.0
Using mini_racer 0.6.2
Using redis 4.5.1
Using sidekiq 6.4.2
Using mini_scheduler 0.13.0
Using mini_sql 1.4.0
Using mini_suffix 0.3.3
Using mocha 1.14.0
Using multi_json 1.15.0
Using multi_xml 0.6.0
Using mustache 1.1.1
Using uri 0.11.0
Using net-http 0.2.2
Using nio4r 2.5.8
Using oauth 0.5.10
Using oauth2 1.4.7
Using oj 3.13.11
Using omniauth 1.9.1
Using omniauth-oauth2 1.7.2
Using omniauth-facebook 9.0.0
Using omniauth-github 1.4.0
Using omniauth-google-oauth2 0.8.2
Using omniauth-oauth 1.2.0
Using omniauth-twitter 1.4.0
Using optimist 3.0.1
Using parallel 1.22.1
Using parallel_tests 3.8.1
Using parser 3.1.2.0
Using pg 1.3.5
Using pry 0.13.1
Using pry-byebug 3.9.0
Using pry-rails 0.3.9
Using puma 5.6.4
Using r2 0.2.7
Using rack-mini-profiler 3.0.0
Using rack-protection 2.2.0
Using rails_failover 0.8.1
Using rails_multisite 4.0.1
Using rainbow 3.1.1
Using raindrops 0.20.0
Using rbtrace 0.4.14
Using rchardet 1.8.0
Using redis-namespace 1.8.2
Using rinku 2.0.6
Using rotp 6.2.0
Using rqrcode_core 1.2.0
Using rqrcode 2.1.1
Using rspec-support 3.11.0
Using rspec-core 3.11.0
Using rspec-expectations 3.11.0
Using rspec-mocks 3.11.1
Using rspec 3.11.0
Using rspec-html-matchers 0.9.4
Using rspec-rails 5.1.2
Using rss 0.2.9
Using rswag-specs 2.5.1
Using rubocop-ast 1.18.0
Using ruby-progressbar 1.11.0
Using unicode-display_width 2.1.0
Using rubocop 1.29.1
Using rubocop-rspec 2.10.0
Using rubocop-discourse 2.5.0
Using ruby-prof 1.4.3
Using ruby-readability 0.7.0
Using rubyzip 2.3.2
Using sanitize 6.0.0
Using sassc 2.0.1
Using sprockets-rails 3.4.2
Using tilt 2.0.10
Using sassc-rails 2.1.2
Using seed-fu 2.3.9
Using shoulda-matchers 5.1.0
Using simplecov-html 0.12.3
Using simplecov_json_formatter 0.1.4
Using simplecov 0.21.2
Using sshkey 2.0.0
Using stackprof 0.2.19
Using test-prof 1.0.9
Using uglifier 4.2.0
Using unf_ext 0.0.8.1
Using unf 0.1.4
Using unicorn 6.1.0
Using webmock 3.14.0
Using webpush 1.1.0
Using xorcist 1.1.2
Using yaml-lint 0.0.10
Bundle complete! 126 Gemfile dependencies, 232 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
1 installed gem you directly depend on is looking for funding.
  Run `bundle fund` for details
Migrating database...
rake aborted!
Errno::EACCES: Permission denied @ dir_s_mkdir - /src/app/assets/javascripts/plugins
/src/lib/plugin/instance.rb:449:in `ensure_directory'
/src/lib/plugin/instance.rb:721:in `activate!'
/src/lib/discourse.rb:279:in `block in activate_plugins!'
/src/lib/discourse.rb:276:in `each'
/src/lib/discourse.rb:276:in `activate_plugins!'
/src/config/application.rb:222:in `block in <class:Application>'
/src/lib/plugin.rb:6:in `initialization_guard'
/src/config/application.rb:221:in `<class:Application>'
/src/config/application.rb:81:in `<module:Discourse>'
/src/config/application.rb:80:in `<main>'
/src/Rakefile:7:in `<main>'
(See full trace by running task with --trace)
# d/rails s
Traceback (most recent call last):
	8: from /src/bin/unicorn:70:in `<main>'
	7: from /src/bin/unicorn:38:in `ensure_cache_clean!'
	6: from /usr/local/lib/ruby/2.7.0/fileutils.rb:211:in `mkdir_p'
	5: from /usr/local/lib/ruby/2.7.0/fileutils.rb:211:in `each'
	4: from /usr/local/lib/ruby/2.7.0/fileutils.rb:226:in `block in mkdir_p'
	3: from /usr/local/lib/ruby/2.7.0/fileutils.rb:226:in `reverse_each'
	2: from /usr/local/lib/ruby/2.7.0/fileutils.rb:228:in `block (2 levels) in mkdir_p'
	1: from /usr/local/lib/ruby/2.7.0/fileutils.rb:250:in `fu_mkdir'
/usr/local/lib/ruby/2.7.0/fileutils.rb:250:in `mkdir': Permission denied @ dir_s_mkdir - /src/tmp (Errno::EACCES)
1 Like