-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-cf
31 lines (24 loc) · 1.02 KB
/
Dockerfile-cf
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
FROM python:3.11.0
MAINTAINER Komal Thareja<komal.thareja@gmail.com>
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
VOLUME ["/usr/src/app"]
EXPOSE 11000
RUN apt-get update
RUN apt-get install cron -y
COPY fabric_cf /usr/src/app/fabric_cf
COPY pyproject.toml /usr/src/app/
COPY README.md /usr/src/app/
COPY tools/audit.py /usr/src/app/
COPY tools/install.sh /usr/src/app/
RUN pip3 install .
RUN mkdir -p "/etc/fabric/message_bus/schema"
RUN mkdir -p "/etc/fabric/actor/config"
RUN mkdir -p "/var/log/actor"
RUN cp /usr/local/lib/python3.11/site-packages/fabric_mb/message_bus/schema/*.avsc /etc/fabric/message_bus/schema
RUN echo "0 2 * * * root /usr/local/bin/python3.11 /usr/src/app/audit.py -f /etc/fabric/actor/config/config.yaml -d 30 -c slices -o remove" >> /etc/crontab
RUN echo "0/15 * * * * root /usr/local/bin/python3.11 /usr/src/app/audit.py -f /etc/fabric/actor/config/config.yaml -d 30 -c slivers -o close" >> /etc/crontab
RUN service cron reload
RUN service cron restart
ENTRYPOINT ["sh"]
CMD ["tail", "-f", "/dev/null"]