0

I currently have a docker-compose.yml file that builds two Dockerfiles. One docker file pulls Python and the other pulls Ubuntu . At the end, I have two containers named dataload_py and dataload_ubuntu. I mounted a file onto dataload_ubuntu that can only be ran on that container.

When I bash into the Python container using docker exec -it dataload_py bash, how can I execute the mounted file on the Ubuntu container? They are bridged through the same network.

My end goal is to be able to spin up a Docker container with both Python and Ubuntu .

King
  • 87
  • 1
  • 9

2 Answers2

0

Maybe you can have one container instead of two. Your Dockerfile will pull from Ubuntu 18 and then in the Dockerfile, you can install python 3.7.3, this way you will only have one cointainer with both ubuntu and python and you can execute your script there

0

I would like to be able to run a winexe command from the Ubuntu container while bashed into the Python container

That's not possible. Docker containers are isolated from one another.

end goal is to be able to spin up a Docker container with both Python 3.7.3 and Ubuntu 18.0.4

Then create an image FROM ubuntu:18.0.4, then install Python 3.7.3 - similar to the existing Docker image for Python 3.7

https://github.com/docker-library/python/blob/34c9df35e9a69e9f0edde88e861b543edb8bc07a/3.7/stretch/Dockerfile

Note: The stretch tag of Python should be able to run the same commands that any Ubuntu container would since both are Debian based.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245