koehn / diaspora-docker

A project to make it easy to run your own Diaspora Pod using Docker containers.
Apache License 2.0
9 stars 3 forks source link

ERROR: Service 'diaspora' failed to build: The command '/bin/sh -c su - diaspora -c /tmp/run_as_diaspora.sh' returned a non-zero code: 2 #5

Open elbrinke opened 7 years ago

elbrinke commented 7 years ago

Hi Koehn,

I get the following error:

~/docker-compose/diaspora-docker/docker$ docker-compose up
Building diaspora
Step 1/11 : FROM debian:jessie
 ---> 8cedef9d7368
Step 2/11 : RUN apt-get update && apt-get install -y build-essential libssl-dev libcurl4-openssl-dev libxml2-dev libxslt-dev imagemagick
 ---> Using cache
 ---> 71033d7de489
Step 3/11 : RUN adduser --gecos "" --disabled-login diaspora
 ---> Using cache
 ---> 26cc65d26e4b
Step 4/11 : COPY run_as_diaspora.sh /tmp/run_as_diaspora.sh
 ---> Using cache
 ---> d66c322d3aba
Step 5/11 : RUN su - diaspora -c /tmp/run_as_diaspora.sh
 ---> Running in 83365df37a86
gpg: directory `/home/diaspora/.gnupg' created
gpg: new configuration file `/home/diaspora/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/diaspora/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/diaspora/.gnupg/secring.gpg' created
gpg: keyring `/home/diaspora/.gnupg/pubring.gpg' created
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: /home/diaspora/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   631  100   631    0     0    849      0 --:--:-- --:--:-- --:--:--   849
bash: line 1: syntax error near unexpected token `newline'
bash: line 1: `<html> '
ERROR: Service 'diaspora' failed to build: The command '/bin/sh -c su - diaspora -c /tmp/run_as_diaspora.sh' returned a non-zero code: 2

Do you have any idea?

jee-r commented 7 years ago

Hi @elbrinke in run_as_diaspora.sh file line 2

try to replace curl -L dspr.tk/1t | bash by curl -L https://s.diaspora.software/1t | bash

https://wiki.diasporafoundation.org/Installation/Debian/Jessie#Get_the_source

elbrinke commented 7 years ago

thanks, I will give it a try...

victort commented 6 years ago

i have a patch for this, which seems to work, but continues on to:

Searching for binary rubies, this might take some time.
No binary rubies available for: debian/8/x86_64/ruby-2.1.10.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for debian.
Missing required packages: libgmp-dev
RVM autolibs is now configured with mode '2' =>
  'Allow RVM to use package manager if found, fail if dependencies are missing. This is default.',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm.io/rvm/autolibs for more information.
Requirements installation failed with status: 1.

so added libgmp-dev, and rebuilt. it gets farther now, but..

* To start using RVM you need to run `source /home/diaspora/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.
Searching for binary rubies, this might take some time.
No binary rubies available for: debian/8/x86_64/ruby-2.1.10.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for debian.
Requirements installation successful.
Installing Ruby from source to: /home/diaspora/.rvm/rubies/ruby-2.1.10, this may take a while depending on your cpu(s)...
ruby-2.1.10 - #downloading ruby-2.1.10, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11.4M  100 11.4M    0     0  2727k      0  0:00:04  0:00:04 --:--:-- 2840k
ruby-2.1.10 - #extracting ruby-2.1.10 to /home/diaspora/.rvm/src/ruby-2.1.10.....
ruby-2.1.10 - #configuring.....................................................
ruby-2.1.10 - #post-configuration..
ruby-2.1.10 - #compiling.............................................................................................
ruby-2.1.10 - #installing.................................
ruby-2.1.10 - #making binaries executable..
ruby-2.1.10 - #downloading rubygems-2.7.7
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  894k  100  894k    0     0  1248k      0 --:--:-- --:--:-- --:--:-- 1247k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.1.10 - #extracting rubygems-2.7.7............................................................................................
....................................................................................................................................
....
ruby-2.1.10 - #removing old rubygems........
$LANG was empty, setting up LANG=C, if it fails again try setting LANG to something sane and try again.
ruby-2.1.10 - #installing rubygems-2.7.7................................
ruby-2.1.10 - #gemset created /home/diaspora/.rvm/gems/ruby-2.1.10@global
ruby-2.1.10 - #importing gemset /home/diaspora/.rvm/gemsets/global.gems...................................................
ruby-2.1.10 - #generating global wrappers.......
ruby-2.1.10 - #gemset created /home/diaspora/.rvm/gems/ruby-2.1.10
ruby-2.1.10 - #importing gemsetfile /home/diaspora/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.1.10 - #generating default wrappers.......
ruby-2.1.10 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.1.10 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri
Cloning into 'diaspora'...
Required ruby-2.4.4 is not installed.
To install do: 'rvm install "ruby-2.4.4"'

implying it needs a newer Ruby.

then dies around:

Installing activesupport 5.1.6
Gem::RuntimeRequirementNotMetError: activesupport requires Ruby version >=
2.2.2. The current ruby version is 2.1.0.
An error occurred while installing activesupport (5.1.6), and Bundler cannot
continue.
Make sure that `gem install activesupport -v '5.1.6'` succeeds before bundling.

In Gemfile:
  devise_lastseenable was resolved to 0.0.6, which depends on
    rails was resolved to 5.1.6, which depends on
      actioncable was resolved to 5.1.6, which depends on
        actionpack was resolved to 5.1.6, which depends on
          actionview was resolved to 5.1.6, which depends on
            rails-dom-testing was resolved to 2.0.3, which depends on
              activesupport
The command '/bin/sh -c su - diaspora -c /tmp/run_as_diaspora.sh' returned a non-zero code: 5

I'll try rebuilding with the newer ruby and if that fixes, will include in PR.

victort commented 6 years ago

build things solved for. please consider merging https://github.com/koehn/diaspora-docker/pull/7

victort commented 6 years ago

oh, there's a newer branch.