Add/edit files inside a docker container using a remotely?
I am using ansible-playbook to
- 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?
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"