forked from fedora-infra/anitya
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile.dev
More file actions
44 lines (31 loc) · 1.33 KB
/
Copy pathContainerfile.dev
File metadata and controls
44 lines (31 loc) · 1.33 KB
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
34
35
36
37
38
39
40
41
42
43
44
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-devel python3-psycopg2 poetry
# Dependencies for tox
RUN dnf install -y git python3-tox libpq libpq-devel gcc graphviz
# Install npm to manage javascript dependencies
RUN dnf install -y npm
RUN dnf autoremove -y && dnf clean all -y
COPY anitya ./anitya
COPY ansible ./ansible
COPY .container ./.container
COPY mypy.cfg alembic.ini anitya.wsgi createdb.py pyproject.toml tox.ini README.rst poetry.lock .
# Copy over configuration files
RUN mkdir -p /etc/anitya
RUN cp /app/ansible/roles/anitya-dev/files/anitya.toml /etc/anitya
RUN mkdir -p /etc/fedora-messaging
RUN cp /app/.container/web/config.toml /etc/fedora-messaging
# Download javascript dependencies
RUN pushd anitya/static && npm install && popd
# Poetry installation
RUN poetry build
RUN pip install dist/*.whl
# Hotfix for social_auth-sqlalchemy
# Should be removed when we switch to something else
RUN sed -i 's/base64.encodestring/base64.encodebytes/g' /usr/local/lib/python3.11/site-packages/social_sqlalchemy/storage.py
CMD ["sh","-c", "poetry build && pip install dist/*.whl && eval '$START_COMMAND'"]