feat(docker): initial

ref: #2 #1
This commit is contained in:
2025-06-30 08:25:23 +09:30
parent 5cd30f0bc0
commit 6dd49ee14b
2 changed files with 48 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
.git
docs/
# includes/

45
dockerfile Normal file
View File

@ -0,0 +1,45 @@
FROM harbor.earth.nww/docker/python:3.11-slim
RUN apt-get update; \
apt-get install -y \
curl \
openjdk-17-jdk-headless; \
pip install ansible-core ansible-rulebook;
RUN addgroup eda; \
adduser --ingroup eda eda
# COPY extensions/eda/rulebooks/webhook.yaml /eda/
RUN ansible-galaxy collection install ansible.eda
# RUN ls -la /home/eda/.ansible/collections/nofusscomputing/git_events/
COPY . /home/eda/.ansible/collections/ansible_collections/nofusscomputing/git_events/
RUN pip install --no-cache-dir -r /home/eda/.ansible/collections/ansible_collections/nofusscomputing/git_events/requirements.txt
COPY includes/ /
RUN cp -r /root/.ansible /home/eda/; \
# cp -r /home/eda/.ansible/collections/ansible_collections/nofusscomputing/git_events/includes/* /; \
rm -rf /home/eda/.ansible/collections/ansible_collections/nofusscomputing/git_events/includes; \
mv /usr/bin/annotations.py /usr/bin/annotations; \
chmod +x /usr/bin/annotations; \
chown eda:eda -R /home/eda;
WORKDIR /home/eda
ENV ANSIBLE_INVENTORY hosts.yaml
# required for parser script
USER eda
CMD [ \
"ansible-rulebook", \
"-r", "nofusscomputing.git_events.webhook", \
"--env-vars", "PROBLEM_MATCHER_PORT,PROBLEM_MATCHER_TOKEN", \
"-v" \
]