如何passenger-install-nginx-module
通过 Dockerfile 安装?
FROM ubuntu:14.04
MAINTAINER hgkim
RUN apt-get update \
&& apt-get install -y curl build-essential libpq-dev advancecomp gcc libpcre3 \
libpcre3-dev zlib1g zlib1g-dev libssl-dev gifsicle jhead \
jpegoptim libjpeg-progs optipng pngquant libzmq-dev libevent-dev python-dev \
python-virtualenv python libcurl4-openssl-dev \
&& virtualenv circus && /circus/bin/pip install circus-web==0.5 \
&& ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime \
&& useradd -d /home/newbie -m -s /bin/bash newbie \
&& usermod -aG root newbie \
&& echo 'ALL ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
&& curl -L -O http://sourceforge.net/projects/pmt/files/pngcrush/1.7.81/pngcrush-1.7.81.tar.gz \
&& tar xvzf pngcrush* \
&& cd pngcrush* \
&& make \
&& mv pngcrush /usr/local/bin/ \
&& cd / && curl -L https://github.com/kelseyhightower/confd/releases/download/v0.6.3/confd-0.6.3-linux-amd64 -o confd \
&& mv confd /usr/local/bin/confd && chmod +x /usr/local/bin/confd
USER newbie
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 \
&& \curl -sSL https://get.rvm.io | bash -s stable \
&& /bin/bash -l -c "rvm install 2.1.0" \
&& /bin/bash -l -c "rvm use 2.1.0" \
&& echo "gem: --no-ri --no-rdoc" > /home/newbie/.gemrc
ENV PATH /home/newbie/.rvm/bin:/home/newbie/.rvm/gems/ruby-2.1.0/bin:/home/newbie/.rvm/gems/ruby-2.1.0@global/bin:/home/newbie/.rvm/rubies/ruby-2.1.0/bin:$PATH
RUN gem install passenger -v 4.0.55 \
&& rvmsudo passenger-install-nginx-module \
--auto --prefix=/usr/local/nginx --auto-download --languages ruby
CMD bash
以上是我的dockerfile。
我只想设置passenger-nginx-module ...
但我RUN
在 Dockerfile 的最后一条指令中出错
RUN gem install passenger -v 4.0.55 \
&& rvmsudo passenger-install-nginx-module \
--auto --prefix=/usr/local/nginx --auto-download --languages ruby
首先,安装passenger,其次,尝试通过rvmsudo passenger-install-nginx-module
命令安装nginx-module。
但是码头工人回应了这个错误
错误:
Unable to autodetect the currently active RVM gem set name. This could happen if you ran this program using 'sudo' instead of 'rvmsudo'. When using RVM, you're always supposed to use 'rvmsudo' instead of 'sudo!'.
Please try rerunning this program using 'rvmsudo'. If that doesn't help, please contact this program's author for support.
虽然我只是试图指挥rvmsudo
......
我应该怎么办?