Skip to content

Commit e1b06c1

Browse files
committed
Merge pull request #13 from tianon/non-root
Support non-root usage trivially
2 parents 13bf613 + 1a40bd7 commit e1b06c1

File tree

4 files changed

+56
-16
lines changed

4 files changed

+56
-16
lines changed

1.7/jdk/Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,23 @@ RUN mkdir /opt/jruby \
1212
&& update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
1313
ENV PATH /opt/jruby/bin:$PATH
1414

15-
RUN echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc
15+
# skip installing gem documentation
16+
RUN mkdir -p /opt/jruby/etc \
17+
&& { \
18+
echo 'install: --no-document'; \
19+
echo 'update: --no-document'; \
20+
} >> /opt/jruby/etc/gemrc
1621

17-
ENV GEM_HOME /usr/local/bundle
18-
ENV PATH $GEM_HOME/bin:$PATH
1922
RUN gem install bundler \
2023
&& bundle config --global path "$GEM_HOME" \
21-
&& bundle config --global bin "$GEM_HOME/bin"
24+
&& bundle config --global bin "$GEM_HOME/bin" \
25+
&& bundle config --global silence_root_warning true
26+
27+
# install things globally, for great justice
28+
ENV GEM_HOME /usr/local/bundle
29+
ENV PATH $GEM_HOME/bin:$PATH
30+
RUN mkdir -p "$GEM_HOME" \
31+
&& chmod 777 "$GEM_HOME"
2232

2333
# don't create ".bundle" in all our apps
2434
ENV BUNDLE_APP_CONFIG $GEM_HOME

1.7/jre/Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,23 @@ RUN mkdir /opt/jruby \
1212
&& update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
1313
ENV PATH /opt/jruby/bin:$PATH
1414

15-
RUN echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc
15+
# skip installing gem documentation
16+
RUN mkdir -p /opt/jruby/etc \
17+
&& { \
18+
echo 'install: --no-document'; \
19+
echo 'update: --no-document'; \
20+
} >> /opt/jruby/etc/gemrc
1621

17-
ENV GEM_HOME /usr/local/bundle
18-
ENV PATH $GEM_HOME/bin:$PATH
1922
RUN gem install bundler \
2023
&& bundle config --global path "$GEM_HOME" \
21-
&& bundle config --global bin "$GEM_HOME/bin"
24+
&& bundle config --global bin "$GEM_HOME/bin" \
25+
&& bundle config --global silence_root_warning true
26+
27+
# install things globally, for great justice
28+
ENV GEM_HOME /usr/local/bundle
29+
ENV PATH $GEM_HOME/bin:$PATH
30+
RUN mkdir -p "$GEM_HOME" \
31+
&& chmod 777 "$GEM_HOME"
2232

2333
# don't create ".bundle" in all our apps
2434
ENV BUNDLE_APP_CONFIG $GEM_HOME

9000/jdk/Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,23 @@ RUN mkdir /opt/jruby \
1212
&& update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
1313
ENV PATH /opt/jruby/bin:$PATH
1414

15-
RUN echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc
15+
# skip installing gem documentation
16+
RUN mkdir -p /opt/jruby/etc \
17+
&& { \
18+
echo 'install: --no-document'; \
19+
echo 'update: --no-document'; \
20+
} >> /opt/jruby/etc/gemrc
1621

17-
ENV GEM_HOME /usr/local/bundle
18-
ENV PATH $GEM_HOME/bin:$PATH
1922
RUN gem install bundler \
2023
&& bundle config --global path "$GEM_HOME" \
21-
&& bundle config --global bin "$GEM_HOME/bin"
24+
&& bundle config --global bin "$GEM_HOME/bin" \
25+
&& bundle config --global silence_root_warning true
26+
27+
# install things globally, for great justice
28+
ENV GEM_HOME /usr/local/bundle
29+
ENV PATH $GEM_HOME/bin:$PATH
30+
RUN mkdir -p "$GEM_HOME" \
31+
&& chmod 777 "$GEM_HOME"
2232

2333
# don't create ".bundle" in all our apps
2434
ENV BUNDLE_APP_CONFIG $GEM_HOME

9000/jre/Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,23 @@ RUN mkdir /opt/jruby \
1212
&& update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
1313
ENV PATH /opt/jruby/bin:$PATH
1414

15-
RUN echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc
15+
# skip installing gem documentation
16+
RUN mkdir -p /opt/jruby/etc \
17+
&& { \
18+
echo 'install: --no-document'; \
19+
echo 'update: --no-document'; \
20+
} >> /opt/jruby/etc/gemrc
1621

17-
ENV GEM_HOME /usr/local/bundle
18-
ENV PATH $GEM_HOME/bin:$PATH
1922
RUN gem install bundler \
2023
&& bundle config --global path "$GEM_HOME" \
21-
&& bundle config --global bin "$GEM_HOME/bin"
24+
&& bundle config --global bin "$GEM_HOME/bin" \
25+
&& bundle config --global silence_root_warning true
26+
27+
# install things globally, for great justice
28+
ENV GEM_HOME /usr/local/bundle
29+
ENV PATH $GEM_HOME/bin:$PATH
30+
RUN mkdir -p "$GEM_HOME" \
31+
&& chmod 777 "$GEM_HOME"
2232

2333
# don't create ".bundle" in all our apps
2434
ENV BUNDLE_APP_CONFIG $GEM_HOME

0 commit comments

Comments
 (0)