I have a web application written in python, sqlalchemy and flask.
The app along with static files, style sheets etc are stored in a folder called flask-app and the program is to be run from:
When i run this from the terminal, it works perfectly well. But it doesn’t work when i run it from docker.
My Dockerfile looks like this:
FROM ubuntu:latest RUN apt-get update -y RUN apt-get install -y python-pip python3.5 build-essential COPY . /server WORKDIR /server RUN pip install --upgrade pip RUN pip install flask SQLAlchemy ENTRYPOINT ["python3.5"] CMD ["server.py"]
I’m running the following:
docker build -t myapp/wine-catalog .
It runs successfully.
But when i run:
docker run myapp/wine-catalog
It says that:
Traceback (most recent call last): File "server.py", line 1, in <module> from flask import Flask, render_template, request, url_for, redirect, flash, jsonify ImportError: No module named 'flask'
I can’t figure out what is going wrong. Any help?
I’m running Manjaro 4.5.0