Try Python interactive mode inside a Docker container

First check if the container is awake

$ docker ps

#If not, wake up the container with the following command
$ docker-compose up -d {Container name}

Go inside the container

$ docker exec -it {Container name} bash

#Once inside, enter "python" and check the operation as you like.
$ container_home#
$ container_home# python
>
>
> print('Hero')
>Hero

Python interactive mode can be exited with "ctr + d" By the way, be careful as you will get angry if Python is not installed in the container.

Recommended Posts

Try Python interactive mode inside a Docker container
Run a Python file inside a Docker container on a remote Raspbian via PyCharm
Carry a Docker container
Create a DI Container in Python
Run Matplotlib on a Docker container
A game to go on an adventure in python interactive mode
Try docker: Create your own container image for your Python web app
I made a Docker container to use JUMAN ++, KNP, python (for pyKNP).
Try sending a SYN packet in Python
Try python
A memo when setting up a Docker container for using JUMAN ++, KNP, python
Run a Python web application with Docker
Try a functional programming pipe in Python
Try drawing a map with python + cartopy 0.18.0
Run matplotlib on a Windows Docker container
Flutter in Docker-How to build and use a Flutter development environment inside a Docker container
Try to calculate a statistical problem in Python
Try to draw a life curve with python
Start a simple Python web server with Docker
[Python] Build a Django development environment with Docker
Try to make a "cryptanalysis" cipher with Python
[Python3] [Ubuntu16] [Docker] Try face recognition with OpenFace
Try to make a dihedral group with Python
Use python in Docker container as Pycharm interpreter
Insert an object inside a string in Python
[Docker] Create a jupyterLab (python) environment in 3 minutes!
Build a Python machine learning environment with a container
Python> try: / except:
python at docker
A memo that uses an interactive display mode like Jupyter notebook with VSCode + Python
Try creating a compressed file using Python and zlib
Building a Docker working environment for R and Python
(Python) Try to develop a web application using Django
[Docker] Adjust container startup timing between dependent services [python]
Make a simple Slackbot with interactive button in python
Try searching for a million character profile in Python
Try embedding Python in a C ++ program with pybind11
How to use python interactive mode with git bash
How to build a Django (python) environment on docker
Create a Layer for AWS Lambda Python with Docker
Launch Django on a Docker container with docker-compose up
Build a Docker container and save png from altair