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

I am new to both docker and ansible.

I am using ansible-playbook to

  • Can Ansible deploy Docker containers remotely?
  • How to use Docker link in Ansible when link var defined
  • Dockerized PostgreSQL: psql: FATAL: the database system is starting up
  • Is it possible to let ansible print each statement?
  • Docker compose in production?
  • Elasticsearch 5.0.1 java permission issue
    • 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?

  • Eclipse IDE within docker
  • Using Docker to mimic an existing Production server vs. deploying Docker containers to production?
  • Dokku push resulting in broken pipe when deploying to Digital Ocean
  • how to update docker in coreos
  • deploy after gitlab runner completes build
  • how to link docker container to each other with docker-compose
  • 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

    http://docs.docker.com/reference/commandline/cp/

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

    see the doc

    http://docs.docker.com/reference/commandline/exec/

    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.