phusion / passenger-docker Goto Github PK
View Code? Open in Web Editor NEWDocker base images for Ruby, Python, Node.js and Meteor web apps
License: MIT License
Docker base images for Ruby, Python, Node.js and Meteor web apps
License: MIT License
Hi there,
I am using this as my baseimage in my Vagrant provider. In this container, I am trying to install a ruby and consistently run into an issue that I believe is happening because of insufficient memory allocation to the compiler:
gcc: internal compiler error: Killed (program cc1)
Is there any way to increase the memory footprint of the virtual machine? (Am I even asking the right question? Perhaps this issue needs to be solved in another way.)
in Vagrant file, i have below config:
v.vm.synced_folder ".", "/home/app/myproject", owner: 'app', group: 'app'
i expect the owner and group in the synced folder is app
, but it is not:
root@7e50f7d51c5d:/home/app/myproject# pwd
/home/app/myproject
root@7e50f7d51c5d:/home/app/myproject# ls -l
total 96
-rw-rw-r-- 1 1000 docker_env 260 Jul 17 12:50 Berksfile
-rw-rw-r-- 1 1000 docker_env 2057 Jul 17 13:00 Gemfile
-rw-rw-r-- 1 1000 docker_env 5999 Jul 17 12:50 Gemfile.lock
The baseimage-docker README makes it fairly clear that one can do things like the following, to debug when your /sbin/my_init
is a dud (because you put bad scripts, etc.):
docker run --rm -t -i phusion/baseimage:<VERSION> /sbin/my_init -- bash -l
(here)docker run -t -i <YOUR_NAME_IMAGE> /sbin/my_init -- bash -l
(here)So in my use case, using passenger-docker
base image and administering it with fig
, I've learned I can do:
fig run web /sbin/my_init
to get at my problems in my web
container. This is extremely helpful and before I realized I could do this, I was puzzled as to how to debug /sbin/my_init
(because nothing winds up in syslog
if you've completely borked it).
It will probably save some newbies (like me!) some trouble if the passenger-docker README also provides this suggestion for debugging.
https://github.com/blaggacao/openproject-docker/tree/cb605af3ef2b37be49b70b26b2c1e20fd8e52f9e
https://gist.github.com/isaacs/579814
Couldn't find any deeper analysis / discussion so far. But this should be fxed in the base image (and probably monitored)
With the release of iojs, node developers can get access to many of the promised 0.12 features, as well as a greatly updated v8. Would be great to have this in Phusion.
Alternatively, consider adding an NVM version, as nvm intends to have support "soon".
I'm not sure if I'm doing this correctly so pardon my ignorance.
I setup my Dockerfile like such:
FROM phusion/passenger-nodejs
# Set correct environment variables.
ENV HOME /root
# ssh
ADD private/keys/daniel.pub /tmp/your_key
RUN cat /tmp/your_key >> /root/.ssh/authorized_keys && rm -f /tmp/your_key
## Download shit
RUN apt-get update
RUN apt-get install -qq -y python-software-properties software-properties-common curl git build-essential
#setup meteor app
ADD .demeteorized /home/app/
WORKDIR /home/app/
RUN npm install
RUN mkdir public
RUN mkdir tmp
RUN chown -R app:app /home/app/
# Use baseimage-docker's init process.
CMD ["/sbin/my_init"]
# Enable nginx
ADD private/docker/vhost.conf /etc/nginx/sites-enabled/app.conf
ADD private/docker/env.conf /etc/nginx/main.d/meteor-env.conf
RUN rm -f /etc/nginx/sites-enabled/default
RUN rm -f /etc/service/nginx/down
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
And I'm running it with:
› docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
<none> <none> 59a8623e7e86 19 seconds ago 882.8 MB
docker run -P 59a8623 /sbin/my_init
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
No SSH host key available. Generating one...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...
Creating SSH2 ED25519 key; this may take some time ...
invoke-rc.d: policy-rc.d denied execution of restart.
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 97
ok: run: /etc/service/nginx-log-forwarder: (pid 115) 0s
And if I try to hit that url mapped from docker ps
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a8ed3f90ad5e 59a8623e7e86 "/sbin/my_init" About a minute ago Up About a minute 0.0.0.0:49228->443/tcp, 0.0.0.0:49229->80/tcp evil_fermi
Routes to: http://192.168.59.103:49229/
I get:
[ 2014-09-11 09:01:42.9768 116/7f7409d61780 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini', 'passenger_version' => '4.0.49', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.49', 'web_server_pid' => '104', 'web_server_type' => 'nginx', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2014-09-11 09:01:42.9845 119/7f5cee1ac780 agents/HelperAgent/Main.cpp:650 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.104/generation-0/request
[ 2014-09-11 09:01:42.9943 124/7fa1da5517c0 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.104/generation-0/logging
[ 2014-09-11 09:01:42.9947 116/7f7409d61780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
2014/09/11 09:02:28 [error] 134#0: *1 directory index of "/home/app/public/" is forbidden, client: 192.168.59.3, server: localhost, request: "GET / HTTP/1.1", host: "192.168.59.103:49229"
2014/09/11 09:02:28 [error] 134#0: *1 directory index of "/home/app/public/" is forbidden, client: 192.168.59.3, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.59.103:49229"
2014/09/11 09:02:29 [error] 134#0: *1 directory index of "/home/app/public/" is forbidden, client: 192.168.59.3, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.59.103:49229"
2014/09/11 09:02:29 [error] 134#0: *1 directory index of "/home/app/public/" is forbidden, client: 192.168.59.3, server: localhost, request: "GET / HTTP/1.1", host: "192.168.59.103:49229"
2014/09/11 09:02:29 [error] 134#0: *1 directory index of "/home/app/public/" is forbidden, client: 192.168.59.3, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.59.103:49229"
2014/09/11 09:02:29 [error] 134#0: *1 directory index of "/home/app/public/" is forbidden, client: 192.168.59.3, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.59.103:49229"
^C*** Shutting down runit daemon (PID 97)...
*** Killing all processes...
Why is it forbidden? Feels like it's not even starting the meteor app though.
I'm probably doing something very wrong here. I'm not sure how to start nginx enabled phusion with meteor.
I got it working standalone but used similar process except passenger start on the docker run instead of sbin/init.
Here's the vhost and env if interested:
https://gist.github.com/dfischer/2693b005c373ecdc1a92 vhost
https://gist.github.com/dfischer/8532bc9f26ce899fef6f env
Thanks.
Using:
FROM phusion/passenger-customizable:0.9.11
RUN /build/utilities.sh
RUN /build/ruby2.0.sh
It's giving this error:
Step 4 : RUN /build/ruby2.0.sh
---> Running in ca6d54781bf6
+ apt-get install -y --no-install-recommends ruby2.0 ruby2.0-dev
Reading package lists...
Building dependency tree...
Reading state information...
Package ruby2.0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ruby2.0' has no installation candidate
E: Unable to locate package ruby2.0-dev
E: Couldn't find any package by regex 'ruby2.0-dev'
Any ideas? Thank you!
Using the insecure_key works only for root, but it fails for app user:
ssh -i ~/.ssh/docker_passenger_insecure.key [email protected] -p 2222
Received disconnect from 127.0.0.1: 2: Too many authentication failures for app
In verbose mode I can see how it's trying to connect:
[ja:~/Projects/X] vagrant(+123/-89) 255 ± ssh -i ~/.ssh/docker_passenger_insecure.key [email protected] -p 2222 -v
OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /home/user/.ssh/config
debug1: /home/ja/.ssh/config line 1: Applying options for *
debug1: /home/ja/.ssh/config line 7: Applying options for 127.0.0.1
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 51: Applying options for *
debug1: auto-mux: Trying existing master
debug1: Control socket "/tmp/[email protected]:2222" does not exist
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 2222.
debug1: Connection established.
debug1: identity file /home/ja/.ssh/docker_passenger_insecure.key type -1
debug1: identity file /home/ja/.ssh/docker_passenger_insecure.key-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6p1 Ubuntu-2ubuntu1
debug1: match: OpenSSH_6.6p1 Ubuntu-2ubuntu1 pat OpenSSH*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr [email protected] none
debug1: kex: client->server aes128-ctr [email protected] none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA e3:e8:cf:11:3a:23:69:60:ff:b5:b5:d1:2f:83:b1:cb
debug1: Host '[127.0.0.1]:2222' is known and matches the ECDSA host key.
debug1: Found key in /home/ja/.ssh/known_hosts:59
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
[... 6 more keys trying ...]
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/user/.ssh/docker_passenger_insecure.key
debug1: read PEM private key done: type RSA
Received disconnect from 127.0.0.1: 2: Too many authentication failures for app
If I add -o 'IdentitiesOnly yes' it ask for a password
I'm not really sure how to use it short of manually copying scripts such as enable_repos.sh
. It doesn't seem to be well documented, nor does how to run passenger enterprise.
# ls build
buildconfig devheaders.sh nodejs.sh redis.sh ruby1.8.sh ruby2.0.sh runit
config memcached.sh python.sh ruby-finalize.sh ruby1.9.sh ruby2.1.sh utilities.sh
Changelog.md identified that a minor update, version 0.9.11, included a fix for an erroneous insecure key. Even though this update was made about a month ago, the new version tag is not available via the Docker registry.
I'm interested :)
I need to add a module to Nginx when running ./configure, specifically:
--add-module=/tmp/pagespeed/ngx_pagespeed-release-1.8.31.4-beta.
How do I go about doing so?
Thanks
Is it possible to set the RAILS_ENV during docker container startup? I want my Dockerfile / built container to work for every environment. But I don't know how to set it's RAILS_ENV to development. It always starts as production. Any ideas?
Trying to set up a webapp with the customizable image.
Had trouble getting nginx to serve requests to a Rails app. After poking around a bit in the image, it turns out that /etc/nginx/sites-enabled/default
exists, and it takes over the catchall server name.
This bums me out when test-deploying images.
As soon as I removed the default
site, nginx would merrily forward my requests to the rails app.
Is this intentional, or is it worth submitting a patch that clobbers the default site?
If it's worth noting, I'm currently not using Passenger as the rack server for the Rails app. I'd explore doing so after I get a stable build/deploy running, but right now Puma is working very well for us.
is there anything specific we need to bear in mind to install postgres? the ubuntu documentation asks to do a apt-get update, not sure if that will mess up with a docker container?
also after i install postgres its complaining about ports... is there a firewall for localhost from inside the machine?
Docker version 1.1.1
passenger-full:0.9.11
docker run --rm -t -i phusion/passenger-full bash -l
netstat -tulpn
top
no port is open, I have expected 22
no application is running apart of bash and top
After creating a Dockerfile with
RUN rm -f /etc/service/nginx/down
RUN rm -f /etc/service/redis/down
docker build -t user/rubystack .
docker run --name rubystack -d -t -i user/rubystack bash -l
docker attach rubystack
netstat -tulpn
no port is open, I have expected 22, 80 and 7474
no application is running apart of bash and top
Also, when I try to run nginx manually I get an error that /var/log/nginx/error.log is missing
/etc/service/nginx/run
warning: /etc/service/nginx-log-forwarder: unable to open supervise/ok: file does not exist
I'm poking around the image with the following command:
docker run -it --rm phusion/passenger-full /sbin/my_init -- bash -l
I'm not seeing Python 2 as an installed binary, only Python 3. I have provided a Gist of my /usr/bin
directory listing: https://gist.github.com/cmwelsh/a86cda96857359fce228
An apt-get udpate
is required before the apt-get -y install nodejs
.
When using passenger-full
, everything works fine until the container is running. I get the following error. Note that it is trying to download the rubyext-ruby-2.1.2 package, which doesn't exist, so it 404s.
Any ideas?
myapp_web_1 | ok: run: /etc/service/nginx-log-forwarder: (pid 114) 1s
myapp_web_1 | [ 2014-07-22 13:34:23.3721 115/7f2305556780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
myapp_web_1 | App 136 stdout:
myapp_web_1 | App 136 stderr: --> Compiling passenger_native_support.so for the current Ruby interpreter...
myapp_web_1 | App 136 stderr: (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
myapp_web_1 | App 136 stderr: --> Downloading precompiled passenger_native_support.so for the current Ruby interpreter...
myapp_web_1 | App 136 stderr: (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
myapp_web_1 | App 136 stderr: Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/4.0.45/rubyext-ruby-2.1.2-x86_64-linux-gnu.tar.gz: The requested URL returned error: 404 Not Found
myapp_web_1 | App 136 stderr: Trying next mirror...
myapp_web_1 | App 136 stderr: Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/4.0.45/rubyext-ruby-2.1.2-x86_64-linux-gnu.tar.gz: The requested URL returned error: 403 Forbidden
myapp_web_1 | App 136 stderr: --> Continuing without passenger_native_support.so.
myapp_web_1 | [ 2014-07-22 13:35:59.9421 118/7f4de0816700 Pool2/Implementation.cpp:883 ]: Could not spawn process for group /home/app/webapp#default: An error occurred while starting up the preloader: it did not write a startup response in time.
myapp_web_1 | in 'void Passenger::ApplicationPool2::SmartSpawner::throwPreloaderSpawnException(const string&, Passenger::SpawnException::ErrorKind, Passenger::ApplicationPool2::Spawner::BackgroundIOCapturerPtr&, const DebugDirPtr&)' (SmartSpawner.h:142)
myapp_web_1 | in 'std::string Passenger::ApplicationPool2::SmartSpawner::negotiatePreloaderStartup(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:562)
myapp_web_1 | in 'void Passenger::ApplicationPool2::SmartSpawner::startPreloader()' (SmartSpawner.h:202)
myapp_web_1 | in 'virtual Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::SmartSpawner::spawn(const Passenger::ApplicationPool2::Options&)' (SmartSpawner.h:746)
myapp_web_1 | in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (Implementation.cpp:804)
myapp_web_1 |
myapp_web_1 | [ 2014-07-22 13:35:59.9424 118/7f4dde4db700 agents/HelperAgent/RequestHandler.h:2262 ]: [Client 20] Cannot checkout session.
myapp_web_1 | Error page:
myapp_web_1 | An error occurred while starting up the preloader: it did not write a startup response in time. Please read <a href="https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems">this article</a> for more information about this problem.<br>
myapp_web_1 | <h2>Raw process output:</h2>
myapp_web_1 | <pre>
myapp_web_1 | --> Compiling passenger_native_support.so for the current Ruby interpreter...
myapp_web_1 | (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
myapp_web_1 | --> Downloading precompiled passenger_native_support.so for the current Ruby interpreter...
myapp_web_1 | (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
myapp_web_1 | Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/4.0.45/rubyext-ruby-2.1.2-x86_64-linux-gnu.tar.gz: The requested URL returned error: 404 Not Found
myapp_web_1 | Trying next mirror...
myapp_web_1 | Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/4.0.45/rubyext-ruby-2.1.2-x86_64-linux-gnu.tar.gz: The requested URL returned error: 403 Forbidden
myapp_web_1 | --> Continuing without passenger_native_support.so.
myapp_web_1 | </pre>
myapp_web_1 | [ 2014-07-22 13:35:59.9499 118/7f4dde4db700 agents/HelperAgent/RequestHandler.h:2262 ]: [Client 21] Cannot checkout session.
myapp_web_1 | Error page:
myapp_web_1 | An error occurred while starting up the preloader: it did not write a startup response in time. Please read <a href="https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems">this article</a> for more information about this problem.<br>
myapp_web_1 | <h2>Raw process output:</h2>
myapp_web_1 | <pre>
myapp_web_1 | --> Compiling passenger_native_support.so for the current Ruby interpreter...
myapp_web_1 | (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
myapp_web_1 | --> Downloading precompiled passenger_native_support.so for the current Ruby interpreter...
myapp_web_1 | (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
myapp_web_1 | Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/4.0.45/rubyext-ruby-2.1.2-x86_64-linux-gnu.tar.gz: The requested URL returned error: 404 Not Found
myapp_web_1 | Trying next mirror...
myapp_web_1 | Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/4.0.45/rubyext-ruby-2.1.2-x86_64-linux-gnu.tar.gz: The requested URL returned error: 403 Forbidden
myapp_web_1 | --> Continuing without passenger_native_support.so.
myapp_web_1 | </pre>
myapp_web_1 | App 155 stdout:
myapp_web_1 | App 155 stderr: --> Compiling passenger_native_support.so for the current Ruby interpreter...
myapp_web_1 | App 155 stderr: (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
myapp_web_1 | App 155 stderr: --> Downloading precompiled passenger_native_support.so for the current Ruby interpreter...
myapp_web_1 | App 155 stderr: (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
myapp_web_1 | App 155 stderr: Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/4.0.45/rubyext-ruby-2.1.2-x86_64-linux-gnu.tar.gz: The requested URL returned error: 404 Not Found
myapp_web_1 | App 155 stderr: Trying next mirror...
myapp_web_1 | App 155 stderr: Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/4.0.45/rubyext-ruby-2.1.2-x86_64-linux-gnu.tar.gz: The requested URL returned error: 403 Forbidden
myapp_web_1 | App 155 stderr: --> Continuing without passenger_native_support.so.
myapp_web_1 | [ 2014-07-22 13:38:10.0399 118/7f4de0816700 Pool2/Implementation.cpp:883 ]: Could not spawn process for group /home/app/webapp#default: An error occurred while starting up the preloader: it did not write a startup response in time.
myapp_web_1 | in 'void Passenger::ApplicationPool2::SmartSpawner::throwPreloaderSpawnException(const string&, Passenger::SpawnException::ErrorKind, Passenger::ApplicationPool2::Spawner::BackgroundIOCapturerPtr&, const DebugDirPtr&)' (SmartSpawner.h:142)
myapp_web_1 | in 'std::string Passenger::ApplicationPool2::SmartSpawner::negotiatePreloaderStartup(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:562)
myapp_web_1 | in 'void Passenger::ApplicationPool2::SmartSpawner::startPreloader()' (SmartSpawner.h:202)
myapp_web_1 | in 'virtual Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::SmartSpawner::spawn(const Passenger::ApplicationPool2::Options&)' (SmartSpawner.h:746)
myapp_web_1 | in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (Implementation.cpp:804)
myapp_web_1 |
myapp_web_1 | [ 2014-07-22 13:38:10.0403 118/7f4dde4db700 agents/HelperAgent/RequestHandler.h:2262 ]: [Client 20] Cannot checkout session.
myapp_web_1 | Error page:
myapp_web_1 | An error occurred while starting up the preloader: it did not write a startup response in time. Please read <a href="https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems">this article</a> for more information about this problem.<br>
myapp_web_1 | <h2>Raw process output:</h2>
myapp_web_1 | <pre>
myapp_web_1 | --> Compiling passenger_native_support.so for the current Ruby interpreter...
myapp_web_1 | (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
myapp_web_1 | --> Downloading precompiled passenger_native_support.so for the current Ruby interpreter...
myapp_web_1 | (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
myapp_web_1 | Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/4.0.45/rubyext-ruby-2.1.2-x86_64-linux-gnu.tar.gz: The requested URL returned error: 404 Not Found
myapp_web_1 | Trying next mirror...
myapp_web_1 | Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/4.0.45/rubyext-ruby-2.1.2-x86_64-linux-gnu.tar.gz: The requested URL returned error: 403 Forbidden
myapp_web_1 | --> Continuing without passenger_native_support.so.
myapp_web_1 | </pre>
I'm no ruby expert, I just have to deploy Redmine, but when installing it, running bundle install ...
installed gems for Ruby 2.0, regardless of which ruby version I selected.
After some investigation, the /usr/local/bin/bundle
script explicitly used the /usr/bin/ruby2.0
executable...
It would be great if Ruby 2.2 was added to the list of available ruby versions.
Am I right in saying that passenger supports code reloading in development mode by setting the passenger_app_env to development?
I tried seeing passenger_app_env to development for a rails app running in a docker container but the code reload does not happen?
Am i missing a step?
thanks
chee
This doesn't seem right to me:
$ docker run -i -t phusion/passenger-ruby20 /bin/bash
root@ebd4c4b0d9c8:/# cat /home/app/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDVmzBG5v7cO9IScGLIzlhGlHNFhXzy87VfaPzru7qnIIdQ1e9FEKvtqEws8hVixnCUdviwX5lvcMk4Ef4Tbrmj3dyF0zFtYbjiTSyl/XQlF68DQlc2sTAdHy96wJHvh7ky511tKJzzyWwSqeef4WjeVK28TqcGnq1up0S7saFO0dJh6OfDAg2cDmhyweR3VgT0vZJyrDV7hte95MBCdK+Gp7fdCyEZcWm3S1DBFaeBqHzzt/Y/njAVKbYL9TIVPum8iMg0rMiLi9ShfP+dT5Xud5Oa3dcN2OWhiDfJw5pfhFJWd44cJ/uGRwQpvNs/PNKsYABhgLlTMUH4iawhu1Xb hongli@asuna-3939
Why is there a hongli@asuna-3939 key in the authorized_keys of the app user?
I've tried the command FROM phusion/passenger-full:0.9.2
on top of my Dockerfile, only to have docker telling no such tag exists.
Can someone please explain this line to me, how does it affect packages installation
It's in image / buildconfig
minimal_apt_get_install='apt-get install -y --no-install-recommends'
This is happening on an image which inherits from passenger-customizable:0.9.12, but I expect it's reproducible on baseimage.
If I kill a container while it's still starting, it completely hangs:
*** Running bash -l...
^C*** Shutting down bash (PID 10)...
*** Shutting down runit daemon (PID 9)...
ok: run: /etc/service/nginx-log-forwarder: (pid 27) 1s
*** runit daemon (PID 9) did not shut down in time. Forcing it to exit.
<stuck forever>
It seems that by default Passenger prefixes logs with some information about what process/file descriptor the log came from. That makes sense, but in my particular use case I'd like to get rid of it.
Is there a flag/environment variable/whatever that I can use to just output the raw logs?
I realize this is really a Passenger thing, but I am using Passenger via Docker and figure this sort of concern might make more sense in a docker-specific environment. That said, let me know if it would be better to open an issue in phusion/passenger.
I just discovered that each time you build the image it will re install ruby (whatever major version) from the repository.
The problem is that if you specify in the Gemfile of your app a ruby version (for example 2.1.3) and then rebuild your docker container based on this image, the build process will build ruby 2.1 based on the latest minor version (2.1.4 today) which is different from the version of your Gemfile and your app will fail to start.
I was getting this randomly this morning, but now it's pretty much all the time. Don't know if it's the image or dockerhub's storage.
I am in a situation where I need only python 2.7, without python 3.0 and I would like to have the opportunity to install just one. As it is already possible with ruby
Can anyone help me debug my issue? I've read the linked article but it hasn't helped.
An error occurred while starting up the preloader: it did not write a startup response in time. Please read this article for more information about this problem.
Raw process output:
--> Compiling passenger_native_support.so for the current Ruby interpreter...
(set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
Warning: compilation didn't succeed. To learn why, read this file:
/tmp/passenger_native_support-tco0f9.log
--> Downloading precompiled passenger_native_support.so for the current Ruby interpreter...
(set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/4.0.40/rubyext-ruby-2.0.0-x86_64-linux-gnu.tar.gz: no download tool found (curl or wget required)
Trying next mirror...
Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/4.0.40/rubyext-ruby-2.0.0-x86_64-linux-gnu.tar.gz: no download tool found (curl or wget required)
--> Continuing without passenger_native_support.so.
/usr/bin/env: ruby2.0: No such file or directory
Hi,
I've noticed that even the passenger-full image doesn't actually have redis installed, though README.md seems to suggest that any but the minimal one does.
Should redis.sh be run when passenger-full is built? Happy to do a pull request if so.
Thanks,
George
FROM phusion/passenger-ruby21:0.9.11
to
FROM phusion/passenger-ruby21:0.9.12
Increases the image size by 200 MB. If I docker-enter into the container, these two folders seem to have shot up in size:
/usr/share/doc
/usr/lib/x86_64-linux-gnu (mostly libqt stuff)
Any ideas what could have gone wrong?
References #52 - Might be related.
passenger-customizable:0.9.11 is missing two files, the absence of which bit me pretty hard.
/build/enable_repos.sh
and
build/ruby_switch
I cloned the passenger_docker repo and just ADD
ed them manually as a workaround.
would be good to have a working example of pulling in a git repo into the container via dockerfile. currently just doing it manually from inside the box and reimaging it instead of doing via dockerfile..
I'm trying to use passenger-docker to setup a Rails 4.1 app, and I think I'm having an issue surrounding passenger and environment variables. The issue I'm having is that when passenger starts up I get this error:
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
Now I know that this error is not specific to passenger-docker, but I think that the reason it cannot find node.js is because of the PATH environment variable on the 'app' user. My asset pre-compilation works fine, so I know that node.js is there and execjs can use it.
I started to look around to see what the best way of getting the path to node.js into the PATH variable for the app user, and I'm not sure what the best way to go about this is. It doesn't seem like there are any hooks in nginx.conf that would allow me to use the 'env' command.
Maybe the path variable isn't the issue here, but based on the passenger error screen, it is set to this:
PATH = /home/app/client_harbor/vendor/bundle/ruby/2.1.0/bin
If you have other ideas I'd like to hear it. In the meantime though, is there a way to get environment variables to passenger that I'm missing?
EDIT: Removed commit and image size reference, when we upgraded from 0.9.11 to 0.9.12 - our image size shot up by 200 MB, I'm trying to troubleshoot that separately. I thought it was because of libqt, but trying to confirm that
libqt seems to increase the image size by quite a bit. Specifically its this line:
## For capybara-webkit.
minimal_apt_get_install libqt4-webkit libqt4-dev
EDIT: Simple re-formatting and line breaks.
I think:
capybara-webkit
. Now why not install PhantomJS by default? Or selenium-webdriver (which is even more widely used)? webkit-gtk, firefox, xvfb, ... I think this decision of which testing framework to use is better taken by the developercapybara-webkit
, I wouldn't really be using nginx/passenger and fiddling with deploying sites, will only be sticking with rack/unicorn/webrick as even cucumber/capybara defaults toSo in my mind, capybara-webkit and nginx/passenger are totally different use cases. Is it possible to fix this?
Hi there,
This seems like an interesting project - I was giving it a shot. However, every time I try to boot nginx/passenger, I get the following error:
Phusion Passenger: no passenger_native_support.so found for the current Ruby interpreter. Downloading precompiled binary from the Phusion server.......
This is just a one-file Sinatra app, so nothing complicated.
I'm doing the following in my Dockerfile
ADD app /home/app/webapp
RUN cd /home/app/webapp && gem install bundler && bundle install --without test development --deployment
RUN rm -f /etc/service/nginx/down
Any ideas?
Since a couple days I'm getting this error:
libruby.so.2.1: cannot open shared object file: No such file or directory - /home/app/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0/kgio-2.9.2/kgio_ext.so (LoadError)
my Dockerfile
is this:
FROM phusion/passenger-ruby21
# Set correct environment variables.
ENV HOME /root
# Install vips
RUN apt-get update
RUN apt-get install -y libvips-dev
# Clean up APT when done
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Enable nginx and passenger
RUN rm -f /etc/service/nginx/down
# Setup app
ADD . /home/app
RUN chown -R app:app /home/app
WORKDIR /home/app
USER app
ENV HOME /home/app
RUN bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment --jobs 4 --retry 3
USER root
# Use baseimage-docker's init process.
CMD /sbin/my_init
I'm not sure I've changed something in the app, but it seems more a system level issue to me.
There should be a /etc/nginx/main.d so that people can easily set 'env' options without modifying the entire nginx.conf.
I'm now 3 days on it and it just not working...
I downloaded passenger-docker and put it in a folder. Than vagrant up with the dockerfile based in "image". Here my dockerfile:
http://pastie.org/9378190
After installing -> vagrant ssh -> cd /vagrant/images -> docker build -t justaname .
After all I got this:
docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
justaname latest a67f0905f540 8 seconds ago 735.7 MB
none none 624e0d224a70 2 minutes ago 661.9 MB
none none 47300eefb96f 24 hours ago 661.9 MB
phusion/passenger-full 0.9.11 5320fda0d529 2 weeks ago 732 MB
phusion/baseimage 0.9.11 dabfc8a40cb5 2 weeks ago 421.6 MB
Now I want "Adding your web app to the image", but the directory
/etc/nginx/sites-enabled/
is not there.
No nginx installed at all! Why? What goes wrong?
I really hope, you could help me.
I have several startup scripts, one of which requires redis. I've noticed that when the script runs during container startup, redis isn't available, but if I log into the container using docker-bash, it runs successfully.
Is it possible to run a script after redis has loaded?
Failed commands run in a container return an error code, but the error output is being dropped.
Try running:
docker run --rm phusion/baseimage:0.9.13 /sbin/my_init -- fake_command
This will output:
<setup>
*** Running fake_command...
*** fake_command exited with status 127.
<cleanup>
Expected output:
bash: fake_command: command not found
I have a fork of phusion/baseimage-docker where I've added in support for my own local squid-deb-proxy server, which speeds up rebuild of images immeasurably.
The phusion passenger mirror site is HTTPS-only and 302's the client if it tries to access any URL via un-crypted channels. I was trying to think of a way to deal with this and the best solution I can come up with is to do most of the work where proxy can be used (archive.ubuntu.com, ppa.launchpad.net) upfront, then add the HTTPS mirrors later and install the passenger debs only once the proxy has been disabled. Still this is not the best solution.
If this is too far out of scope feel free to close this issue with no action. I can't think of any good solution; maybe there is a way to instruct Apt to only use the proxy for HTTP plain text, it seems like The Internet Says that you have to explicitly enable the proxy for https, which I am not doing. http://chandrusoft.wordpress.com/2012/09/30/disable-proxy-when-using-apt-get/
I don't really want to MITM my connection with oss-binaries.phusionpassenger.com
Is it possible to install it for apache2, too? With the "normal" passenger, I have the option for that and what must I do here?
How to set up vagrant + docker + nodejs + ruby + gems + apache + passenger?
Hi there
I'm using the passenger-full image with version 0.9.11.
When trying to install the postgres gem (for ruby 2.1) I'm getting the following error:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
But I thought I saw the necessary lib "libpq-dev" as one of the install dependencies.
I get the same error when trying to use the ruby21 image.
Can you give me a hint what's wrong?
How do I upgrade nginx to use websockets with passenger apps if I'm not proxying to a standalone passenger instance?
Hey there,
I was wondering how I could get nginx inside the passenger container to proxy to a different container running on the same host. Specifically it would be a location directive e.g. /blog that I want to proxy. I'm just wondering how to get the IP address of the host dynamically and then insert that into the nginx conf.
Running docker logs
doesn't seem to give me any useful log messages. I'd like to be able to see the output of console.log
in my nodejs app but that doesn't seem to work out of the box. Any workarounds?
You describe in the readme the setting of the nginx SECRET_KEY with:
env SECRET_KEY 123456;
and placing it in /etc/nginx/main.d/secret_key.conf
But this leads to the following error:
nginx: [emerg] invalid number of arguments in "env" directive in /etc/nginx/main.d/secret_key.conf:1
It might be a dump question but how CAN I set the secret key?
Regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.