So, im trying to learn docker and tried making a simple image to try it out. The docker build part goes well but when I docker run, I get a problem:
(base) daniellombardi@Daniels-MacBook-Pro MyApp-test % docker run bd
/bin/sh: 1: python: not found
The Dockerfile:
FROM ubuntu
RUN apt-get update && apt-get install -y python3 python3-pip
RUN pip3 install flask
RUN mkdir /MyApp-test
ADD folder /opt/MyApp-test
EXPOSE 5000
CMD python .main.py
and for anyone wondering, this is the code on main.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'IT WORKED! I AM RUNNING FROM A DOCKER CONTAINER!!!'
if __name__ == '__main__':
app.run(host="0.0.0.0", port=5000)