-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.tests
32 lines (22 loc) · 1023 Bytes
/
Dockerfile.tests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# this allows dockerfile to *know* about build arguments
FROM python:3.11.6-alpine as test
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV HEADLESS 1
# To install pgconfig, required for PostgreSQL database engine
#https://stackoverflow.com/questions/46711990/error-pg-config-executable-not-found-when-installing-psycopg2-on-alpine-in-dock
RUN apk update && \
apk add postgresql-libs && \
apk add --virtual .build-deps build-base musl-dev postgresql-dev libffi-dev python3-dev cargo
RUN apk update
RUN apk add --no-cache curl gnupg
RUN curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --import -
RUN echo "http://dl.google.com/linux/chrome/deb/ stable main" | tee -a /etc/apk/repositories
RUN apk add --no-cache chromium chromium-chromedriver
COPY poetry.lock pyproject.toml /mainapps/
WORKDIR /mainapps
RUN pip install --upgrade pip && \
pip install poetry
RUN poetry export --output requirements-dev.txt --with dev
RUN pip install -r requirements-dev.txt
COPY . /mainapps