# Why would you NOT use setup\_remote\_docker for docker executors

**URL:** <https://discuss.circleci.com/t/why-would-you-not-use-setup-remote-docker-for-docker-executors/50791>\
**Category:** Build Environment\
**Tags:** docker\
**Created:** [March 14, 2024, 9:12pm UTC](https://discuss.circleci.com/t/why-would-you-not-use-setup-remote-docker-for-docker-executors/50791 "2024-03-14T21:12:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![webmonarch](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/webmonarch/32/35121_2.png) [@webmonarch](https://discuss.circleci.com/u/webmonarch)\
**Post date:** [March 14, 2024, 9:12pm UTC](https://discuss.circleci.com/t/why-would-you-not-use-setup-remote-docker-for-docker-executors/50791/1 "2024-03-14T21:12:51Z")

</div>

AFAICT, if you use `setup_remote_docker` you get an execution environment of:

- 4 CPU, **15 GB RAM** for 20 credits/min  
vs
- 4 CPU, **8 GB RAM** for 20 credits/min

without the setting.

What am I missing? Why would you not use the `setup_remote_docker` modifier for all jobs (at the medium and large resource class level)?

---

<div class="post-metadata">

**Author:** ![rit1010](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/rit1010/32/34738_2.png) [@rit1010](https://discuss.circleci.com/u/rit1010)\
**Post date:** [March 14, 2024, 11:21pm UTC](https://discuss.circleci.com/t/why-would-you-not-use-setup-remote-docker-for-docker-executors/50791/2 "2024-03-14T23:21:47Z")

</div>

I can not say why it was decided to vary the RAM allocation, for `setup_remote_docker` environments, but the primary restriction that would stop most people using it as a general CI environment is the lack of control over the environment provided.

The images provided for ‘setup\_remote\_docker’ are only focused on providing a basic Linux system that can run different releases of docker. With the recent changes to the support list, this has become a very tight focus on the very latest 3 docker versions.

In terms of `setup_remote_docker` vs ‘docker’ environment the issue comes down to where you want the ‘run’ commands executed. For a ‘docker’ environment the ‘run’ commands are executed within the first container/image loaded. `setup_remote_docker` like ‘machine’ causes the ‘run’ commands to be executed in the main environment so that the full functionality of the docker or docker compose commands can be accessed.

---

<div class="post-metadata">

**Author:** ![rit1010](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/rit1010/32/34738_2.png) [@rit1010](https://discuss.circleci.com/u/rit1010)\
**Post date:** [March 15, 2024, 12:00am UTC](https://discuss.circleci.com/t/why-would-you-not-use-setup-remote-docker-for-docker-executors/50791/3 "2024-03-15T00:00:09Z")

</div>

The following old thread provides a little more info.

> [@Changes to Remote Docker Reporting & Pricing](https://discuss.circleci.com/t/changes-to-remote-docker-reporting-pricing/47759/1):
>
> CircleCI has significantly improved the execution speed and reliability of jobs that use the [setup\_remote\_docker](https://circleci.com/docs/building-docker-images/) feature. [Our new implementation](https://discuss.circleci.com/t/setup-remote-docker-architecture-change/45303) of the underlying architecture that powers jobs using setup\_remote\_docker gives you better flexibility, reliability, performance. Before: All jobs that used setup\_remote\_docker used a primary container that was the size of the resource class specified in config.yml & a remote medium-sized Linux virtual machine to execute Docker commands, regardless …

It does not answer your current question instead, it shows that in the past that there was an even larger difference between the offerings as the original meaning of ‘remote’ was just that a controlling environment would be created based on the resource class specified in config.yml and then an additional medium-sized linux environment would be created where the docker commands were run. Only the first environment was charged for.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [March 22, 2024, 12:00am UTC](https://discuss.circleci.com/t/why-would-you-not-use-setup-remote-docker-for-docker-executors/50791/4 "2024-03-22T00:00:12Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
