title: Become root in a docker container
body: <p>I installed <a href="https://developernote.com/2019/03/running-oracle-database-in-a-docker-container-on-ubuntu-18-04/" rel="noreferrer">Oracle Database in a Docker container</a>, but can't figure out how to become root. If I to this from the host</p>
  
  <pre><code>sudo docker exec -it -u 0 oracle18se /bin/bash
  </code></pre>
  
  <p>or </p>
  
  <pre><code>sudo docker exec -it --user root oracle18se /bin/bash
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "chdir to cwd (\"/home/oracle\") set in config.json failed: permission denied": unknown
  </code></pre>
  
  <p>If I do</p>
  
  <pre><code>sudo docker exec -it oracle18se /bin/bash
  </code></pre>
  
  <p>from the host, and then</p>
  
  <pre><code>su -
  </code></pre>
  
  <p>from the container, it asks the root password, but I do not know it.</p>
  
  <p>Hy host OS is Ubuntu 18.04, <a href="https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/dockerfiles/18.3.0/Dockerfile" rel="noreferrer">link to docker file</a></p>
  
  <p><strong>EDIT1:</strong></p>
  
  <p>Found a Docker <a href="https://github.com/docker/for-win/issues/4133" rel="noreferrer">bug</a>.</p>