This repository was archived by the owner on Jan 31, 2026. It is now read-only.
forked from fedora-infra/anitya
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathContainerfile.dev
More file actions
52 lines (37 loc) · 1.66 KB
/
Copy pathContainerfile.dev
File metadata and controls
52 lines (37 loc) · 1.66 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
45
46
47
48
49
50
51
52
ARG FEDORA_VERSION
FROM registry.fedoraproject.org/fedora:${FEDORA_VERSION}
WORKDIR /app
ENV TZ=Asia/Shanghai
# 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 docker
RUN curl -fsSL https://test.docker.com -o test-docker.sh && \
sed -i 's/docker-model-plugin/docker-compose-plugin/g' test-docker.sh && \
sudo sh test-docker.sh
# 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 updatedb.py runserver.py ./
# 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
RUN sed -i 's/hex.replace/str(hex).replace/g' /usr/lib64/python3.11/uuid.py
CMD ["sh","-c", "poetry build && pip install dist/*.whl && eval '$BEFORE_COMMAND' && eval '$START_COMMAND'"]