I am new to ubuntu and I'm trying to create a docker image in ubuntu 16.04 using a dockerfile .
FROM ubuntu:16.04 MAINTAINER bill <bill@gmailcom> RUN apt-get update RUN apt-get install -y dh-python RUN apt-get install -y python3 python3-pip RUN apt-get install -y bcrypt RUN pip3 install flask pymongo flask_bcrypt RUN pip3 install Flask-PyMongo py-bcrypt RUN mkdir /app RUN mkdir -p /app/templates COPY webservice.py /app/webservice.py ADD templates /app/templates EXPOSE 5000 WORKDIR /app ENTRYPOINT ["python3" , "-u" , "webservice.py" ]
RUN apt-get install -y dh-pythonwas added because at first I would get the error
Package python3 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: dh-python E: Package 'python3' has no installation candidate The command '/bin/sh -c apt-get install -y python3 python3-pip' returned a non-zero code: 100
but then after trying to build my image again I got a new error :
The following packages have unmet dependencies: dh-python : Depends: python3:any (>= 3.3.2-2~) but it is not installable E: Unable to correct problems, you have held broken packages. The command '/bin/sh -c apt-get install dh-python' returned a non-zero code: 100
I changed my default python version from 2.7 to 3.6.9 but still got the same error . I would appreciate your help with this issue . Thank you in advance