# Docker: setup user operation not permitted

**URL:** <https://discuss.circleci.com/t/docker-setup-user-operation-not-permitted/2248>\
**Category:** Build Environment\
**Tags:** docker\
**Created:** [February 20, 2016, 7:07pm UTC](https://discuss.circleci.com/t/docker-setup-user-operation-not-permitted/2248 "2016-02-20T19:07:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![g3d](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/g3d/32/1686_2.png) [@g3d](https://discuss.circleci.com/u/g3d)\
**Post date:** [February 20, 2016, 7:07pm UTC](https://discuss.circleci.com/t/docker-setup-user-operation-not-permitted/2248/1 "2016-02-20T19:07:49Z")

</div>

I tried to run [GitHub - codeclimate/codeclimate: Code Climate CLI](https://github.com/codeclimate/codeclimate) inside circle ci container, but received error.

> ubuntu@box667$ docker run \
> 
> > –interactive --tty --rm   
> > –env CODE\_PATH=“$PWD”   
> > –volume “$PWD”:/code   
> > –volume /var/run/docker.sock:/var/run/docker.sock   
> > –volume /tmp/cc:/tmp/cc   
> > codeclimate/codeclimate analyze  
> > WARNING: Your kernel does not support memory swappiness capabilities, memory swappiness discarded.  
> > Starting analysis  
> > Running brakeman: Done!  
> > error: (CC::Analyzer::Engine::EngineFailure) engine brakeman failed with status 1 and stderr  
> > WARNING: Your kernel does not support memory limit capabilities. Limitation discarded.  
> > time=“2016-02-20T19:01:05Z” level=fatal msg=“setup user operation not permitted”  
> > time=“2016-02-20T19:01:06Z” level=fatal msg=“Error response from daemon: Cannot destroy container 5f1e776791250d08a32fe2b37ae30c439e7e9b6c8f58f411b2963a1ca8549f2b: Driver btrfs failed t  
> > o remove root filesystem 5f1e776791250d08a32fe2b37ae30c439e7e9b6c8f58f411b2963a1ca8549f2b: Failed to destroy btrfs snapshot: operation not permitted”  
> > Error deleting container: Error response from daemon: Cannot destroy container d1f9f4722eb9b47c276c7d7bc6451d4a416877aa9be4a978a973c519ab20dcb2: Driver btrfs failed to remove root files  
> > ystem d1f9f4722eb9b47c276c7d7bc6451d4a416877aa9be4a978a973c519ab20dcb2: Failed to destroy btrfs snapshot: operation not permitted

If I receive `rm` flag I don’t receive error regarding btrfs, but looks like the root of the problem is user creation [https://github.com/codeclimate-community/brakeman/blob/master/Dockerfile#L12](https://github.com/codeclimate-community/brakeman/blob/master/Dockerfile#L12).

Could you please suggest anything?

---

<div class="post-metadata">

**Author:** ![ckaeslin](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@ckaeslin](https://discuss.circleci.com/u/ckaeslin)\
**Post date:** [April 4, 2016, 1:50pm UTC](https://discuss.circleci.com/t/docker-setup-user-operation-not-permitted/2248/2 "2016-04-04T13:50:39Z")

</div>

The problems are these two lines:

> <https://github.com/codeclimate/codeclimate/blob/master/lib/cc/analyzer/engine.rb#L56>

and #61

I removed both and built a custom docker image ([https://hub.docker.com/r/etops/codeclimate/](https://hub.docker.com/r/etops/codeclimate/)) which works.

---

<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:** [June 18, 2018, 11:38am UTC](https://discuss.circleci.com/t/docker-setup-user-operation-not-permitted/2248/3 "2018-06-18T11:38:01Z")

</div>


