- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Connecting two docker containers and...
Page Start Prev 1 Next End
Connecting two docker containers and then return result with restful A
Connecting two docker containers and then return result with restful A
Mar-16-21 22:02:45
I have one container with install ubuntu on that and then install openmodelica for the main container and then have another container that has restful API with python and then I want to run the second container and then connect it with the first one and run openmodelica and then return a result(with CSV file) to first one.
how could I implement it?
Re: Connecting two docker containers and then return result with restful A
Mar-17-21 07:28:43
The easiest way would be something like:
Code:
$ docker run --network=host -it openmodelica/openmodelica:v1.16.2-minimal
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2290fa2e1fa6 openmodelica/openmodelica:v1.16.2-minimal "/bin/bash" 8 seconds ago Up 6 seconds eager_easley
$ python3
>>> import OMPython
>>> omc=OMPython.OMCSessionZMQ(dockerContainer="2290fa2e1fa6")
>>> omc.sendExpression("getVersion()")
'OpenModelica 1.16.2'
- sjoelund.se
- 1700 Posts
Page Start Prev 1 Next End
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Connecting two docker containers and...
There are 0 guests and 0 other users also viewing this topic