Python/Docker: Difference between revisions
< Python
Jump to navigation
Jump to search
| Line 4: | Line 4: | ||
sudo docker pull python:3.8.6 | sudo docker pull python:3.8.6 | ||
sudo docker run --name py01 -it python:3.8.6 | sudo docker run --name py01 -it python:3.8.6 | ||
import platform | >>> import platform | ||
platform.uname() | >>> platform.uname() | ||
platform.machine() | uname_result(system='Linux', node='812f9e38e887', release='5.4.0-58-generic', version='#64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020', machine='x86_64', processor='') | ||
>>> platform.machine() | |||
'x86_64' | |||
</source> | </source> | ||
Revision as of 03:41, 17 December 2020
Test a docker image
sudo docker pull python:3.8.6
sudo docker run --name py01 -it python:3.8.6
>>> import platform
>>> platform.uname()
uname_result(system='Linux', node='812f9e38e887', release='5.4.0-58-generic', version='#64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020', machine='x86_64', processor='')
>>> platform.machine()
'x86_64'