# Ruby Installation in a Docker container

**URL:** <https://forums.docker.com/t/ruby-installation-in-a-docker-container/35734>\
**Category:** General\
**Tags:** docker\
**Created:** [July 28, 2017, 10:13pm UTC](https://forums.docker.com/t/ruby-installation-in-a-docker-container/35734 "2017-07-28T22:13:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![snavien](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@snavien](https://forums.docker.com/u/snavien)\
**Post date:** [July 28, 2017, 10:13pm UTC](https://forums.docker.com/t/ruby-installation-in-a-docker-container/35734/1 "2017-07-28T22:13:21Z")

</div>

I installed ruby through rvm using these commands:  
`curl -sSL https://get.rvm.io | bash -s stable --without-gems="rvm rubygems-bundler" \ --with-gems="kubeclient" && \ bin/bash -l -c "rvm requirements" && \ bin/bash -l -c "rvm install 2.4" && \ /bin/bash -l -c "rvm use 2.4 --default" && \ /bin/bash -l -c "gem install kubeclient" && \`  
along with other things but in the original single RUN command but the size seems to have doubled.

However if I install it after it’s been built with the same commands in the container, it doesn’t increase in size as much.

---

<div class="post-metadata">

**Author:** ![think](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/think/32/14641_2.png) [@think](https://forums.docker.com/u/think)\
**Post date:** [July 29, 2017, 11:06am UTC](https://forums.docker.com/t/ruby-installation-in-a-docker-container/35734/2 "2017-07-29T11:06:51Z")

</div>

try to do a `docker history YOUR_IMAGE_ID`. This allows you to see how much space each layer is using.
