forked from fedora-infra/anitya
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Containerfile.dev
33 lines (22 loc) · 877 Bytes
/
Containerfile.dev
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
33
ARG FEDORA_VERSION
FROM registry.fedoraproject.org/fedora:${FEDORA_VERSION}
WORKDIR /app
# Package installation steps are separated so they
# can be cached individually on Dockerfile changes
RUN dnf upgrade --refresh -y
# Python3 and packages
RUN dnf install -y python3 python3-pip python3-devel python3-psycopg2
# Dependencies for tox
RUN dnf install -y git python3-tox libpq libpq-devel gcc graphviz
RUN dnf autoremove -y && dnf clean all -y
# Create aliases for python and pip
RUN echo 'alias python="python3"' >> ~/.bashrc
RUN echo 'alias pip="pip3"' >> ~/.bashrc
COPY . .
RUN mkdir -p /etc/anitya
RUN cp /app/ansible/roles/anitya-dev/files/anitya.toml /etc/anitya
# Pip installations
RUN pip install -r /app/test_requirements.txt
RUN pip install -r /app/requirements.txt
RUN pip install psycopg2
CMD ["sh","-c", "pip3 install -e /app && eval '$START_COMMAND'"]