Execute Python script inside a given docker-compose container
<p>I have made a little python script to create a DB and some tables inside a RethinkDB</p>

<p>But now I'm trying to launch this python script inside my <code>rethink</code> container launched with <code>docker-compose</code>.</p>

<p>This is my docker-compose.yml rethink container config</p>

<pre><code># Rethink DB
rethink:
  image: rethinkdb:latest
  container_name: rethink
  ports:
    - 58080:8080
    - 58015:28015
    - 59015:29015
</code></pre>

<p>I'm trying to execute the script with after launching my container</p>

<pre><code>docker exec -it rethink python src/app/db-install.py
</code></pre>

<p>But I get this error </p>

<blockquote>
  <p>rpc error: code = 2 desc = oci runtime error: exec failed: exec: "python": executable file not found in $PATH</p>
</blockquote>

<p>Python is not found in me container. Is this possible to execute a python script inside a given container with <code>docker-compose</code> or with <code>docker exec</code> ?</p>