Add/edit files inside a docker container using a remotely?

I am new to both docker and ansible.

I am using ansible-playbook to

  • cannot connect to docker on RemoteServer using Ansible
  • Docker compose in production?
  • docker daemon start using ansible
  • Network connection between 2 Docker Container (JBOSS/DATABASE)
  • Using Ansible docker_service module to deploy service to swarm
  • Run a shell command inside a running Docker container using Ansible
    • Remotely login into a server
    • Pull docker images from docker hub
    • Create a new container.

    I now want to add/edit some files to the container and run some pre-installed programs on the container.Is there a way to do so without opening the terminal and doing it manually?

  • Prevent docker from creating image from cache
  • How to run headless Firefox profile manager? How run Firefox profile manager in docker?
  • How to restore a redis backup in a redis container?
  • Can I mount a windows network path inside docker without -v option?
  • DCOKER_CERT_PATH is not supported in docker 1.9
  • pytest: environment variable to specify pytest.ini location
  • One Solution collect form web for “Add/edit files inside a docker container using a remotely?”

    add/edit some files to the container

    docker cpfor copying files to the container, see the doc

    docker exec -it container_id bashand then or commands or
    docker exec -it container_id sh -c awk...

    see the doc

    run some pre-installed programs

    docker exec -it container_id sh -c "run your program"

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.