Access running docker container filesystem

I am developing a WordPress theme and set up the development environment using docker. My docker-compose.yml volume property looks like this;

  - ~/WordPress/wp-content:/var/www/html/wp-content   

it mounts just the wp-content directory to the local machine. I now have to edit wp-config file which is in /var/www/html/ the docker image container. Can anyone here show me how to access and edit the wp-config file in the running docker container?

  • Displaying GUI Application in Docker Container on Windows 10 Host Without Linux Servers
  • Mount a host file as a data volume in docker
  • Docker container linking via port forwarding?
  • getting Docker script to load with git-bash in ConEmu/Cmder
  • Ports not accessible in Docker on Mac
  • Docker Image file details
  • Running a docker-compose “Getting Started” example causes “Invalid volume specification” on Windows
  • Is Alpine Linux an implementation of a Unikernel?
  • Connecting to Host Postgresql From inside a Container
  • sha256 of locally built docker image
  • Can I run windows containers using docker-toolbox on windows 7?
  • rsync files from inside a docker container?
  • One Solution collect form web for “Access running docker container filesystem”

    You can run a shell terminal in the running container.

    1. Get the container ID

       docker ps
    2. Run the terminal

       docker exec -it container_ID "/bin/bash"

    But, whatever change you do, it will not be persisted. You have to map this volume also.

          - ~/WordPress/wp-content:/var/www/html
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.