Skip to content

Instantly share code, notes, and snippets.

@arthurafarias
Created September 11, 2025 09:16
Show Gist options
  • Select an option

  • Save arthurafarias/c933211f791b7efac466637262ce5390 to your computer and use it in GitHub Desktop.

Select an option

Save arthurafarias/c933211f791b7efac466637262ce5390 to your computer and use it in GitHub Desktop.
How to Gain Root Access to Modify Host Folders with Docker

#How to Gain Root Access to Modify Host Folderd with Docker

It's easier as mounting the target folder in the container and modifying it.

docker run -ti -v/etc:/working ubuntu bash

Now you have access without typing sudo in your host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment