-
Notifications
You must be signed in to change notification settings - Fork 32
/
Containerfile.dev
49 lines (35 loc) · 1.51 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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
# Kerberos packages
RUN dnf install -y krb5-devel krb5-workstation fedora-packager-kerberos
# Fedora Messaging
RUN dnf install -y fedora-messaging
# RPM tools needed by hotness
RUN dnf install -y fedpkg rpmdevtools
# Python3 and packages
RUN dnf install -y python3 python3-pip python3-bugzilla \
python3-koji python3-requests \
python3-black python3-flake8 python3-sphinx \
python3-redis
# Development tools (for doing stuff inside of the container)
RUN dnf install -y vim-enhanced tox python3-rpdb gcc git
# Packages that are required for releasing
RUN dnf install -y poetry python3-towncrier
COPY hotness ./hotness
COPY devel ./devel
COPY .container ./.container
COPY pyproject.toml poetry.lock tox.ini README.rst LICENSE .
# Providing config.toml
RUN cp /app/devel/ansible/roles/hotness-dev/files/config.toml ~
ENV FEDORA_MESSAGING_CONF=/root/config.toml
# Install local packages in editable mode
RUN poetry build
RUN pip install dist/*.whl
# Comment out the line that starts with 'default_ccache_name'
# for preventing following error: `kinit: Invalid UID in persistent keyring name while getting default ccache`
RUN sed -i '/^[^#]/ s/\(^.*default_ccache_name.*$\)/#\1/' /etc/krb5.conf
CMD ["sh","-c", "poetry build && pip install --force-reinstall dist/*.whl && while true; do sleep 60; done"]