Discourse dev environment using Podman

I basically explain the whole issue below. Did anyone get it working on Fedora?

Well, I have tried to follow the guide and in my case I haven’t had any issues so far that I have read in your post :frowning:

One big difference is that for volume mounts with podman, you normally append a :Z or a :z, depending on if the mount is meant for one container only (Z) or will be re-used by multiple (z) and this will take care of the SELinux stuff for you. I’m not sure how to translate that in the context of the script here.

With so far you mean you were able to complete the step about d/boot_dev --init?

@vwbusguy, true, I’ll replace it with :Z and see how that goes, it’s now set to delegated.

Yup, I was able to complete the step :slight_smile:

Very strange, I also used a Fedora VM, clean install, same issue. Do you have SELinux enabled? And you use Podman?

yep I didn’t disable SELinux and I use podman :slight_smile:
for me it’s all fine!

Changing ‘delegated’ (quick search said that it has to do with caching on Mac, so not relevant on Linux anyway) to ‘:Z’ changed the outcome!

Bundle complete! 126 Gemfile dependencies, 231 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...
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
rake aborted!
Errno::EACCES: Permission denied @ dir_s_mkdir - /src/app/assets/javascripts/plugins
/src/lib/plugin/instance.rb:442:in `ensure_directory'
/src/lib/plugin/instance.rb:712:in `activate!'
/src/lib/discourse.rb:299:in `block in activate_plugins!'
/src/lib/discourse.rb:296:in `each'
/src/lib/discourse.rb:296:in `activate_plugins!'
/src/config/application.rb:228:in `block in <class:Application>'
/src/lib/plugin.rb:6:in `initialization_guard'
/src/config/application.rb:227: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)
[user@fedora discourse]$ d/rails s
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Traceback (most recent call last):
	30: from /src/bin/rails:18:in `<main>'
	29: from /usr/local/lib/ruby/gems/2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	28: from /usr/local/lib/ruby/gems/2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	27: from /usr/local/lib/ruby/gems/2.7.0/gems/railties-7.0.3.1/lib/rails/commands.rb:18:in `<main>'
	26: from /usr/local/lib/ruby/gems/2.7.0/gems/railties-7.0.3.1/lib/rails/command.rb:48:in `invoke'
	25: from /usr/local/lib/ruby/gems/2.7.0/gems/railties-7.0.3.1/lib/rails/command/base.rb:87:in `perform'
	24: from /usr/local/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
	23: from /usr/local/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
	22: from /usr/local/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
	21: from /usr/local/lib/ruby/gems/2.7.0/gems/railties-7.0.3.1/lib/rails/commands/server/server_command.rb:134:in `perform'
	20: from /usr/local/lib/ruby/gems/2.7.0/gems/railties-7.0.3.1/lib/rails/commands/server/server_command.rb:134:in `tap'
	19: from /usr/local/lib/ruby/gems/2.7.0/gems/railties-7.0.3.1/lib/rails/commands/server/server_command.rb:137:in `block in perform'
	18: from /usr/local/lib/ruby/gems/2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	17: from /usr/local/lib/ruby/gems/2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	16: from /src/config/application.rb:80:in `<main>'
	15: from /src/config/application.rb:81:in `<module:Discourse>'
	14: from /src/config/application.rb:227:in `<class:Application>'
	13: from /src/lib/plugin.rb:6:in `initialization_guard'
	12: from /src/config/application.rb:228:in `block in <class:Application>'
	11: from /src/lib/discourse.rb:296:in `activate_plugins!'
	10: from /src/lib/discourse.rb:296:in `each'
	 9: from /src/lib/discourse.rb:299:in `block in activate_plugins!'
	 8: from /src/lib/plugin/instance.rb:712:in `activate!'
	 7: from /src/lib/plugin/instance.rb:442:in `ensure_directory'
	 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/app/assets/javascripts/plugins (Errno::EACCES)

But still, not really a complete success. @andilinux, you use F36? Any customizations? Because even in a clean VM I encounter this, so something in your setup must be different.

@keesdejong I am using Silverblue
But I can install F36 on VM to reproduce your issue, if I should face the same like u :slight_smile:

If you’re willing to to do that, then that would be much appreciated. I’m surprised it works for you if you follow the same steps of git clone, cd into the discourse folder and then run that d/boot_dev --init script.

I can do this - I can take some time on it :slight_smile:

1 Like

Evenings @keesdejong ,

I reproduced the steps and I am able to complete d/boot_dev --init

aka the discourse is running :slight_smile:

1 Like

That’s very, very strange. Because going through the steps (excluding installing Docker itself of course) I run into total different issues. I honestly can’t see this work other than disabling SELinux and using a native Docker environment.

It works here too, but only when using Docker and disabling SELinux. Very strange it works for you… Since we’re using the same environment and steps, we should have the exact same results.