0

I am trying to run docker for an alpine image but unable to install psycopg2 from requirements.txt, tried all the solutions for similar problems but none worked.

Dockerfile

FROM frolvlad/alpine-miniconda3:python3.7 as base

FROM base as builder
# RUN apt-get update \
#     && apt-get install -y build-essential \
#     && apt-get install -y nginx 
WORKDIR /usr/src/app
COPY ./requirements.txt /usr/src/app/requirements.txt
RUN python -m venv /opt/venv
# Make sure we use the virtualenv:
ENV PATH="/opt/venv/bin:$PATH"
RUN pip install gunicorn


RUN pip install -r requirements.txt


FROM base
RUN apk add nginx bash
# RUN conda install python==3.7.1
COPY --from=builder /usr/src/app /usr/src/app
COPY --from=builder /opt/venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"

COPY . /usr/src/app/rapid-nrn-backend
WORKDIR /usr/src/app/rapid-nrn-backend

CMD ["/bin/bash", "entrypoint.sh"]
EXPOSE 80
EXPOSE 8000

requirements.txt requirements.txt

Any help is highly appreciated.

0 Answers0