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?

  • Program can't find Boost Graph installed in Docker
  • docker-compose does not start postgres image
  • Docker - Retrieve command line from an image
  • How to bind volumes in docker-py?
  • Trying to build openface docker container
  • How to override the CMD command in the docker run line
  • Using Docker for HPC with Sun Grid Engine
  • Docker (under boot2docker) does not look for/find local images when building
  • Making a docker container a part of a vpn
  • Meteor Mupx with Nginx reverse proxy
  • Jenkins build an image for Docker?
  • How to use awslog driver in to get the logs from the 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.