Pass messages as file through docker-py

Is there a way to pass messages as a file through docker and execute it on the docker shell?

For instance, if x = “print 12345”, can I pass the value of x as a python file and copy it into my container. Then use shell to run this python file?

  • How to install latest version of make in centos6.6 docker container
  • How I can create docker-machine from Command-Line on Docker for Mac without VirtualBox?
  • denied: requested access to the resource is denied : docker
  • Does Apache Mesos + Marathon support LXD cluster management?
  • Can't run sample express app in node container on Windows
  • How do I Docker COPY as non root?
  • Getting 'authentication required' error while pulling jenkins image
  • Dockerized Angular 4 and Django is compiled successfully but localhost:4200 is not working
  • Managing docker containers with ansible - best practices
  • Docker command with build / run / etc. “too many open files”
  • Why Can't I Access Service in Docker Swarm by its Name or VIP?
  • How to programmatically set the github repo inside jenkins job configuration page
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.