Reputation: 1286
This is my docker file
FROM ubuntu:14.04
ADD ./file.py ./
CMD python file.py
I am building using below command:
docker build -t myimage .
And running using this:
docker run myimage
And then getting below error after running:
/bin/sh: 1: python: not found
What should I do so the file file.py will be executed using python ?
Upvotes: 2
Views: 6301
Reputation: 10264
Use the official python
Docker image:
FROM python:3.6
COPY ./file.py ./
CMD python file.py
Upvotes: 3