Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# VERSION 0.0.1

FROM drecom/centos-base:latest
FROM drecom/centos-base:latest AS build

MAINTAINER Drecom Technical Development Department <pr_itn@drecom.co.jp>

Expand All @@ -27,4 +27,11 @@ ENV PATH /usr/local/rbenv/bin:/usr/local/rbenv/shims:$PATH
RUN eval "$(rbenv init -)"; rbenv install 2.3.1 \
&& eval "$(rbenv init -)"; rbenv global 2.3.1 \
&& eval "$(rbenv init -)"; gem update --system \
&& eval "$(rbenv init -)"; gem install bundler
&& eval "$(rbenv init -)"; gem install bundler --force

FROM centos:7
ENV RBENV_ROOT /usr/local/rbenv
COPY --from=build $RBENV_ROOT $RBENV_ROOT
ENV PATH /usr/local/rbenv/bin:/usr/local/rbenv/shims:$PATH
RUN echo 'export RBENV_ROOT=/usr/local/rbenv' >> /root/.bashrc \
&& echo 'eval "$(rbenv init -)"' >> /root/.bashrc