这里新增了ruby和bundler。 我在泊坞窗图像与此泊坞窗文件安装它们:如何使用dockerfile安装ruby和bundler?
FROM alpine:3.5
# Install Ruby, Ruby Bundler and other ruby dependencies
RUN apk add --update \
ruby ruby-bigdecimal ruby-bundler \
ca-certificates libressl \
libressl-dev build-base ruby-dev \
ruby-rdoc ruby-io-console ruby-irb; \
\
&& bundle config build.nokogiri --use-system-libraries; \
&& bundle config git.allow_insecure true; \
\
&& gem install json foreman --no-rdoc --no-ri; \
&& gem cleanup; \
&& rm -rf /usr/lib/ruby/gems/*/cache/*; \
&& apk del libressl-dev build-base ruby-dev; \
&& rm -rf /var/cache/apk/* /tmp;
CMD ["bundle"]
当我运行做码头工人来看,我得到:
Don't run Bundler as root. Bundler can ask for sudo if it is needed,
and installing your bundle as root will break this application for all
non-root users on this machine.
Could not locate Gemfile or .bundle/ directory
我该如何解决这个问题?我只是想安装Ruby和Ruby-捆绑,并用此来完成...
是机器有非root用户? –
这是一个码头集装箱,所以我不这么认为。 – Becks
我也没有。为何不忽略警告? –