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

I am new to both docker and ansible.

I am using ansible-playbook to

  • Ansible docker_container gives “Error getting network id”
  • One or more undefined variables: 'dict object' has no attribute 'SSH_AUTH_SOCK'
  • Docker image is not visible when I run docker ps
  • Cannot deploy docker containers from different hosts
  • Creating docker swarm using ansible
  • ansible-container variables in playbook
    • 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?

  • Invalid package version npm
  • What is the difference between running software in a Docker container Vs Real OS
  • What is the docker.sock equivalent on Windows 10?
  • How to git install instead of pip install?
  • Easiest way to deploy with docker-compose?
  • Docker nginx reverse proxy returns 502 bad gateway “connection refused while connecting to upstream”
  • 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.