Forem Creators and Builders 🌱

Discussion on: Podman: Difficulty installing Forem on Ubuntu 18.04 TLS

Collapse
 
jdoss profile image
Joe Doss

Please check out this PR which should fix the issues you are seeing.

github.com/forem/forem/pull/9835

Collapse
 
avalerionv profile image
Dawood Khan Masood • Edited

Thank you so much for your reply and the pull request. I destroyed the previous instance, re-created another (same OS as previous), cloned Forem from the original repository and I am still getting errors:

  • This is the first error that shows up when using Podman to build and run the container.
STEP 19: COPY ./.ruby-version "${APP_HOME}"
--> d6bfc3e5cf4
ERRO[0527] error deleting build container "c90f7f38204a048368598dcdc8693a69f046691da09deab50b96c4bc485a7771": identifier is not a container 
Error: identifier is not a container: error preparing container for next step: error creating build container: error creating container: error creating read-write layer with ID "ea41b3fecfebbf4001c2273fe73d831cff068055c5f6886e45d752e23ad41c5f": no space left on device
125
Starting the Forem container stack...
using podman version: podman version 2.0.4
Error: error inspecting object: unable to find a name and tag match for forem-rails in repotags: no such image
podman build -t forem-rails:latest -f ./Dockerfile .
Enter fullscreen mode Exit fullscreen mode

Installing Forem using Docker also has few errors that I would like to mention:

  • I was not able to run "bin/container-setup" directly without sudo, so I added my current user to docker group with the following command:
$ bin/container-setup
Building the Forem container image!
This will take a while if you are building the container for the first time.
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

$ sudo setfacl -m user:$USER:rw /var/run/docker.sock
$ bin/container-setup
Enter fullscreen mode Exit fullscreen mode
  • At "Step 9" it has the same issue as podman-compose.
Step 9/30 : RUN groupadd -g "${APP_GID}" "${APP_USER}" &&     adduser -u "${APP_UID}" -g "${APP_GID}" -d "${APP_HOME}" "${APP_USER}"
 ---> Running in 3c1f8cb19915
adduser: warning: the home directory /opt/apps/forem/ already exists.
adduser: Not copying any file from skel directory into it.
Enter fullscreen mode Exit fullscreen mode
  • There are multiple warnings when linking dependencies:
[4/5] Linking dependencies...
warning " > babel-loader@8.1.0" has unmet peer dependency "webpack@>=2".
warning " > file-loader@6.0.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning " > style-loader@1.2.1" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning " > preact-textarea-autosize@4.0.7" has incorrect peer dependency "preact@>=6.3.0 < 6.4.0".
warning " > rails-erb-loader@5.5.2" has unmet peer dependency "webpack@^2.0.0 || >= 3.0.0-rc.0 || ^3.0.0".
warning " > @storybook/addon-a11y@6.0.5" has unmet peer dependency "react@*".
warning " > @storybook/addon-a11y@6.0.5" has unmet peer dependency "react-dom@*".
warning " > @storybook/addons@6.0.5" has unmet peer dependency "react@*".
warning " > @storybook/addons@6.0.5" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-a11y > @storybook/api@6.0.5" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-a11y > @storybook/client-api@6.0.5" has unmet peer dependency "react@*".
warning "@storybook/addon-a11y > @storybook/client-api@6.0.5" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-a11y > @storybook/components@6.0.5" has unmet peer dependency "react@*".
warning "@storybook/addon-a11y > @storybook/components@6.0.5" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-a11y > @storybook/theming@6.0.5" has unmet peer dependency "react@*".
warning "@storybook/addon-a11y > @storybook/theming@6.0.5" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-a11y > react-sizeme@2.6.12" has unmet peer dependency "react@^0.14.0 || ^15.0.0-0 || ^16.0.0".
warning "@storybook/addon-a11y > react-sizeme@2.6.12" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0-0 || ^16.0.0".
warning "@storybook/addon-links > @storybook/router@6.0.5" has unmet peer dependency "react@*".
warning "@storybook/addon-links > @storybook/router@6.0.5" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-a11y > @storybook/api > @reach/router@1.3.4" has unmet peer dependency "react-dom@15.x || 16.x || 16.4.0-alpha.0911da3".
warning "@storybook/addon-notes > markdown-to-jsx@6.11.4" has unmet peer dependency "react@>= 0.14.0".
warning "@storybook/addon-a11y > @storybook/theming > @emotion/core@10.0.28" has unmet peer dependency "react@>=16.3.0".
warning "@storybook/addon-a11y > @storybook/theming > @emotion/styled@10.0.27" has unmet peer dependency "react@>=16.3.0".
warning "@storybook/addon-a11y > @storybook/theming > emotion-theming@10.0.27" has unmet peer dependency "react@>=16.3.0".
warning "@storybook/addon-a11y > @storybook/theming > @emotion/styled > @emotion/styled-base@10.0.31" has unmet peer dependency "react@>=16.3.0".
warning " > @storybook/addon-actions@6.0.5" has unmet peer dependency "react-dom@*".
warning " > @storybook/addon-knobs@6.0.5" has unmet peer dependency "react@*".
warning " > @storybook/addon-knobs@6.0.5" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-knobs > react-select@3.1.0" has unmet peer dependency "react@^16.8.0".
warning "@storybook/addon-knobs > react-select@3.1.0" has unmet peer dependency "react-dom@^16.8.0".
warning "@storybook/addon-knobs > react-select > react-input-autosize@2.2.2" has unmet peer dependency "react@^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0".
warning "@storybook/addon-knobs > react-select > react-transition-group@4.4.1" has unmet peer dependency "react@>=16.6.0".
warning "@storybook/addon-knobs > react-select > react-transition-group@4.4.1" has unmet peer dependency "react-dom@>=16.6.0".
warning " > @storybook/addon-links@6.0.5" has unmet peer dependency "react@*".
warning " > @storybook/addon-links@6.0.5" has unmet peer dependency "react-dom@*".
warning " > @storybook/addon-notes@5.3.19" has unmet peer dependency "react@*".
warning "@storybook/addon-notes > @storybook/api@5.3.19" has unmet peer dependency "regenerator-runtime@*".
warning "@storybook/addon-notes > @storybook/components@5.3.19" has unmet peer dependency "react@*".
warning "@storybook/addon-notes > @storybook/components@5.3.19" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-notes > @storybook/router@5.3.19" has unmet peer dependency "react@*".
warning "@storybook/addon-notes > @storybook/router@5.3.19" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-notes > @storybook/theming@5.3.19" has unmet peer dependency "react@*".
warning "@storybook/addon-notes > @storybook/theming@5.3.19" has unmet peer dependency "react-dom@*".
warning " > @storybook/addon-storyshots@6.0.5" has unmet peer dependency "react-dom@*".
warning "@storybook/addon-storyshots > @storybook/core@6.0.5" has unmet peer dependency "react@*".
warning "@storybook/addon-storyshots > @storybook/core@6.0.5" has unmet peer dependency "react-dom@*".
warning " > @storybook/preact@6.0.5" has incorrect peer dependency "preact@^8.0.0|^10.0.0".
warning " > @storybook/preact@6.0.5" has unmet peer dependency "react@*".
warning " > @storybook/preact@6.0.5" has unmet peer dependency "react-dom@*".
warning " > css-loader@4.2.1" has unmet peer dependency "webpack@^4.27.0 || ^5.0.0".
warning " > eslint-config-preact@1.1.1" has incorrect peer dependency "eslint@6.x".
warning "eslint-config-preact > eslint-plugin-react-hooks@2.5.1" has incorrect peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0".
warning "eslint-config-preact > eslint-plugin-jest > @typescript-eslint/experimental-utils > @typescript-eslint/typescript-estree > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
warning " > eslint-import-resolver-webpack@0.12.2" has unmet peer dependency "webpack@>=1.11.0".
warning "redoc-cli > redoc@2.0.0-rc.36" has incorrect peer dependency "styled-components@^4.1.1".
warning "redoc-cli > styled-components@5.1.1" has unmet peer dependency "react-is@>= 16.8.0".
warning " > sass-loader@9.0.3" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
warning " > webpack-dev-server@3.11.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
Enter fullscreen mode Exit fullscreen mode
  • Lastly there is an infinite connection refused warning after every 1 second:
sidekiq_1        | 2020/08/18 10:27:46 Problem with request: Get http://rails:3000: dial tcp 172.18.0.7:3000: connect: connection refused. Sleeping 1s
seed_1           | 2020/08/18 10:27:46 Problem with request: Get http://rails:3000: dial tcp 172.18.0.7:3000: connect: connection refused. Sleeping 1s
Enter fullscreen mode Exit fullscreen mode

Edit: Ah, nevermind. It took some time but Docker seems to be working fine.

Collapse
 
jdoss profile image
Joe Doss

Did you check out my PR's branch and use that with Podman?

Thread Thread
 
avalerionv profile image
Dawood Khan Masood

Correct me if I am wrong but the pull request is already merged into the master repository, right? If so, I cloned the repository again and tried to run the "container-setup" again.

I was able to run it on Docker with no issue, though.

Thread Thread
 
jdoss profile image
Joe Doss • Edited

~No it's in a branch off the main repo. You need to check it out first and test it out.~

Strike this. It was merged and I missed it. It should work. I tested it on my end with Podman before pushing it up.

Thread Thread
 
jdoss profile image
Joe Doss • Edited

This error

Error: identifier is not a container: error preparing container for next step: error creating build container: error creating container: error creating read-write layer with ID "ea41b3fecfebbf4001c2273fe73d831cff068055c5f6886e45d752e23ad41c5f": no space left on device
Enter fullscreen mode Exit fullscreen mode

This might be due to disk space issues on your computer? Try nuking the podman volumes:

podman volume list

podman volume prume

Thread Thread
 
avalerionv profile image
Dawood Khan Masood • Edited

What is the minimum requirement for disk space? I had allocated 30 GB of space for this.

I was able to install Forem by manually installing everything but I had few problems such as:

  1. Moving from development environment to production. Since this is literally my first time working with Ruby on Rails.

  2. Changing port from 3000 to 80. I figured Procfile.dev was responsible for server port but I had issue with permission:

Errno::EACCES in at_exit
Permission denied - bind(2) for "0.0.0.0" port 80
Enter fullscreen mode Exit fullscreen mode

So a quick workaround was to port forward from 80 to 3000 but I don't think this is the correct way.

Is there any documentation or guide which could help me with these issues? I think if someone was able to provide a guide on how to fully install Forem from basic configurations to making it production-ready, that would be great!

Thread Thread
 
jdoss profile image
Joe Doss

I allocate 50GB in my test environments which should be fine. If you are running Forem as a non root user (which is recommended) you will want to do this:

sudo sh -c "echo 0 > /proc/sys/net/ipv4/ip_unprivileged_port_start"

which will let a non root user bind to lower ports like port 80.

Thread Thread
 
avalerionv profile image
Dawood Khan Masood • Edited

Great, thank you! :)