1 year ago
#359124
opensource-developer
rbenv: command not found using docker
i am trying to install ruby 2.7 using rbenv
on a docker environment, below is the relevant part of my docker file
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y gnupg2
RUN apt-get update && apt-get dist-upgrade -y && DEBIAN_FRONTEND=noninteractive apt-get install -y git-core zlib1g-dev liblzma-dev patch build-essential libpq-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn tzdata imagemagick postgresql postgresql-contrib && rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
RUN echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
RUN echo 'eval "$(rbenv init -)"' >> ~/.bashrc
SHELL ["/bin/bash", "-c"]
RUN source ~/.bashrc
RUN git clone https://github.com/rbenv/ruby-build.git
RUN PREFIX=/usr/local ./ruby-build/install.sh
RUN rbenv install 2.7.1
RUN gem install bundler
this results in following error
#13 1.036 /bin/bash: rbenv: command not found
------
executor failed running [/bin/bash -c rbenv install 2.7.1]: exit code: 127
any help on how to fix this would be great, thanks.
bash
docker
ubuntu
rbenv
0 Answers
Your Answer