-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathContainerfile.mcp
More file actions
66 lines (55 loc) · 2.09 KB
/
Copy pathContainerfile.mcp
File metadata and controls
66 lines (55 loc) · 2.09 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM fedora:42
# Install RH IT Root CAs for access to internal services
COPY files/Current-IT-Root-CAs.pem /etc/pki/ca-trust/source/anchors/
RUN update-ca-trust
ARG INTERNAL_REPO_URL=""
RUN if [ -n "$INTERNAL_REPO_URL" ]; then \
curl -fsSL -o /etc/yum.repos.d/internal.repo "$INTERNAL_REPO_URL"; \
fi
ARG EXTRA_PACKAGES=""
# Install system dependencies
RUN dnf -y install \
python3 \
python3-aiofiles \
python3-aiohttp \
python3-copr \
python3-ogr \
python3-pip \
python3-redis \
python3-requests \
python3-GitPython \
python3-flexmock \
python3-koji \
krb5-libs \
krb5-workstation \
centpkg \
git \
${EXTRA_PACKAGES} \
&& dnf clean all
# Install beeai mcp server
RUN pip3 install --no-cache-dir "litellm!=1.82.7,!=1.82.8" beeai-framework[mcp]==0.1.80 "specfile>=0.36.0"
# Create user
RUN useradd -m -G wheel mcp
# Copy required directories
# Individual directories are mounted as volumes in development
COPY ymir/tools/ /home/mcp/ymir/tools/
COPY ymir/common/ /home/mcp/ymir/common/
COPY files/ipa_redhat_com /etc/krb5.conf.d/ipa_redhat_com
RUN chgrp -R root /home/mcp && chmod -R g+rwX /home/mcp
# "fatal: detected dubious ownership in repository at '/git-repos/"
# we tell git that all repos in /git-repos/* and .../applicability/* are safe to fetch into
# because this is a volume that has different owner than our container process
RUN mkdir /git-repos && chmod -R o+rwX /git-repos && \
git config --system --add safe.directory '/git-repos/*' && \
git config --system --add safe.directory '/git-repos/applicability/*'
# Configure jump host for internal dist-git
COPY files/internal_dist-git_ssh.conf /etc/ssh/ssh_config.d/00-dist-git.conf
# Set up internal dist-git and GitLab SSH host keys
COPY files/internal_dist-git_host_keys files/gitlab_host_keys /tmp/
RUN cat /tmp/internal_dist-git_host_keys /tmp/gitlab_host_keys > /etc/ssh/ssh_known_hosts \
&& rm /tmp/internal_dist-git_host_keys /tmp/gitlab_host_keys
USER mcp
ENV HOME=/home/mcp
WORKDIR $HOME
ENV PYTHONPATH=$HOME:$PYTHONPATH
CMD ["/bin/bash"]