Block a user
kairos (latest)
Published 2026-06-04 20:07:06 +00:00 by admin
Installation
docker pull git.lab.leadwire.dev/admin/kairos:latestsha256:d8cdce7fd52875eb0a71610fffaae4fd5ff20db0a485a89f746ea78ec306942c
Image Layers
| ADD oraclelinux-8-amd64-rootfs.tar.xz / # buildkit |
| CMD ["/bin/bash"] |
| RUN /bin/sh -c dnf -y update # buildkit |
| RUN /bin/sh -c dnf install -y perl # buildkit |
| ADD deps/rpm/perl-IO-Tty-1.12-11.el8.x86_64.rpm /tmp # buildkit |
| ADD deps/rpm/perl-IPC-Run-0.99-1.el8.noarch.rpm /tmp # buildkit |
| RUN /bin/sh -c rpm -i /tmp/perl-IO-Tty-1.12-11.el8.x86_64.rpm # buildkit |
| RUN /bin/sh -c rpm -i /tmp/perl-IPC-Run-0.99-1.el8.noarch.rpm # buildkit |
| RUN /bin/sh -c dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm # buildkit |
| RUN /bin/sh -c dnf -qy module disable postgresql # buildkit |
| RUN /bin/sh -c dnf install -y postgresql17-server postgresql17-devel postgresql17-contrib postgresql17 postgresql17-plpython3 # buildkit |
| RUN /bin/sh -c dnf install -y python3 # buildkit |
| RUN /bin/sh -c dnf install -y python3.12 python3.12-devel python3.12-pip # buildkit |
| RUN /bin/sh -c alternatives --set python /usr/bin/python3.12 # buildkit |
| RUN /bin/sh -c ln -s /usr/pgsql-17/bin/pg_config /usr/bin/pg_config # buildkit |
| RUN /bin/sh -c ln -s /usr/pgsql-17/bin/pg_ctl /usr/bin/pg_ctl # buildkit |
| RUN /bin/sh -c ln -s /usr/pgsql-17/bin/initdb /usr/bin/initdb # buildkit |
| RUN /bin/sh -c dnf install -y wget # buildkit |
| RUN /bin/sh -c dnf install -y make # buildkit |
| RUN /bin/sh -c dnf install -y gcc # buildkit |
| RUN /bin/sh -c dnf install -y vim # buildkit |
| RUN /bin/sh -c dnf install -y unzip # buildkit |
| RUN /bin/sh -c dnf install -y zip # buildkit |
| RUN /bin/sh -c dnf install -y libaio # buildkit |
| RUN /bin/sh -c dnf install -y libnsl # buildkit |
| RUN /bin/sh -c dnf install -y cronie # buildkit |
| RUN /bin/sh -c dnf install -y psmisc # buildkit |
| RUN /bin/sh -c dnf install -y openssh-clients # buildkit |
| RUN /bin/sh -c dnf install -y redhat-rpm-config # buildkit |
| RUN /bin/sh -c dnf install -y lsof # buildkit |
| RUN /bin/sh -c dnf install -y procps # buildkit |
| RUN /bin/sh -c dnf install -y logrotate # buildkit |
| ADD deps/zip/instantclient-basic-linux.x64.zip /usr/local/lib # buildkit |
| ADD deps/zip/instantclient-sdk-linux.x64.zip /usr/local/lib # buildkit |
| WORKDIR /usr/local/lib |
| RUN /bin/sh -c unzip instantclient-basic-linux.x64.zip # buildkit |
| RUN /bin/sh -c unzip instantclient-sdk-linux.x64.zip # buildkit |
| RUN /bin/sh -c rm instantclient-basic-linux.x64.zip # buildkit |
| RUN /bin/sh -c rm instantclient-sdk-linux.x64.zip # buildkit |
| RUN /bin/sh -c mv instantclient_19_14 instantclient # buildkit |
| WORKDIR /usr/local/lib/instantclient |
| ENV ORACLE_HOME=/usr/local/lib/instantclient |
| ENV LD_LIBRARY_PATH=/usr/local/lib/instantclient |
| RUN /bin/sh -c echo ORACLE_HOME=/usr/local/lib/instantclient >> /var/lib/pgsql/.bash_profile # buildkit |
| RUN /bin/sh -c echo LD_LIBRARY_PATH=/usr/local/lib/instantclient >> /var/lib/pgsql/.bash_profile # buildkit |
| RUN /bin/sh -c echo PGDATA=/var/lib/pgsql/data >> /var/lib/pgsql/.bash_profile # buildkit |
| RUN /bin/sh -c echo PATH=/usr/pgsql-17/bin:${PATH} >> /var/lib/pgsql/.bash_profile # buildkit |
| RUN /bin/sh -c echo export ORACLE_HOME LD_LIBRARY_PATH PATH PGDATA>> /var/lib/pgsql/.bash_profile # buildkit |
| ADD deps/tar/oracle_fdw-2.7.0.tar.gz /tmp # buildkit |
| RUN /bin/sh -c cd /tmp/oracle_fdw-2.7.0 && make && make install # buildkit |
| ADD deps/rpm/pgkairos-1.3-1.noarch.rpm /tmp # buildkit |
| RUN /bin/sh -c cd /tmp && rpm --ignoreos --prefix=$(pg_config --sharedir)/extension -i /tmp/pgkairos-1.3-1.noarch.rpm # buildkit |
| RUN /bin/sh -c python -m pip install --upgrade pip # buildkit |
| RUN /bin/sh -c python -m pip install python-magic # buildkit |
| RUN /bin/sh -c python -m pip install asyncinotify # buildkit |
| RUN /bin/sh -c python -m pip install psycopg2-binary # buildkit |
| RUN /bin/sh -c python -m pip install sqlalchemy # buildkit |
| RUN /bin/sh -c python -m pip install plotly==5.24.1 # buildkit |
| RUN /bin/sh -c python -m pip install pandas # buildkit |
| RUN /bin/sh -c python -m pip install aiohttp # buildkit |
| RUN /bin/sh -c python -m pip install yarl # buildkit |
| RUN /bin/sh -c python -m pip install setproctitle # buildkit |
| RUN /bin/sh -c python -m pip install gunicorn # buildkit |
| RUN /bin/sh -c python -m pip install psutil # buildkit |
| RUN /bin/sh -c python -m pip install "dask[complete]" # buildkit |
| RUN /bin/sh -c python -m pip install streamlit # buildkit |
| RUN /bin/sh -c python -m pip install streamlit_extras # buildkit |
| RUN /bin/sh -c python -m pip install streamlit_antd_components # buildkit |
| RUN /bin/sh -c python -m pip install streamlit-ace # buildkit |
| RUN /bin/sh -c python -m pip install st-theme # buildkit |
| RUN /bin/sh -c python -m pip install lxml # buildkit |
| RUN /bin/sh -c python -m pip install cx_Oracle # buildkit |
| RUN /bin/sh -c python -m pip install loguru # buildkit |
| RUN /bin/sh -c python -m pip install fabric # buildkit |
| RUN /bin/sh -c python -m pip install pexpect # buildkit |
| RUN /bin/sh -c python -m pip install pscript # buildkit |
| RUN /bin/sh -c python -m pip install textwrap3 # buildkit |
| RUN /bin/sh -c python -m pip install htmlgenerator # buildkit |
| RUN /bin/sh -c python -m pip install supervisor # buildkit |
| RUN /bin/sh -c rm -fr /postgres # buildkit |
| RUN /bin/sh -c ln -s /var/lib/pgsql /postgres # buildkit |
| RUN /bin/sh -c rm -fr /postgres/17 # buildkit |
| RUN /bin/sh -c mkdir /postgres/backups # buildkit |
| RUN /bin/sh -c mkdir /postgres/data # buildkit |
| COPY deps/tar/pgboot.tar /postgres/backups # buildkit |
| RUN /bin/sh -c mv /etc/cron.daily/logrotate /etc/cron.hourly # buildkit |
| RUN /bin/sh -c echo "/var/log/kairos/webserver.log {" > /etc/logrotate.d/webserver && echo " compress" >> /etc/logrotate.d/webserver && echo " rotate 4" >> /etc/logrotate.d/webserver && echo " copytruncate" >> /etc/logrotate.d/webserver && echo " size=10M" >> /etc/logrotate.d/webserver && echo " weekly" >> /etc/logrotate.d/webserver && echo "}">> /etc/logrotate.d/webserver # buildkit |
| ENV KAIROS_VERSION=9.7 |
| RUN /bin/sh -c mkdir /certificates # buildkit |
| RUN /bin/sh -c mkdir /autoupload # buildkit |
| RUN /bin/sh -c mkdir /export # buildkit |
| RUN /bin/sh -c mkdir /kairos # buildkit |
| COPY src/kairos/index.html /kairos # buildkit |
| COPY src/kairos/client.js /kairos # buildkit |
| COPY src/kairos/setup.py /kairos # buildkit |
| COPY src/kairos/worker.py /kairos # buildkit |
| RUN /bin/sh -c mkdir /kairos/resources # buildkit |
| COPY deps/html/ /kairos/resources # buildkit |
| RUN /bin/sh -c mkdir /kairos/pykairos # buildkit |
| COPY src/kairos/pykairos/* /kairos/pykairos # buildkit |
| RUN /bin/sh -c cd /kairos && python -m pip install . # buildkit |
| COPY src/kairos/kairos /kairos # buildkit |
| RUN /bin/sh -c chmod 755 /kairos/kairos # buildkit |
| RUN /bin/sh -c ln -s /kairos/kairos /usr/local/bin/kairos # buildkit |
| RUN /bin/sh -c mkdir /var/log/kairos # buildkit |
| RUN /bin/sh -c echo '* * * * * psql -d kairos -c "select snap_system()"' > /tmp/crontab && echo '* * * * * psql -d kairos -c "select snap()"' >> /tmp/crontab && echo '* * * * * TERM=xterm flock -w1 /tmp/lock watch -n 20 -e -t --precise -x psql -d kairos -c "select snap_detailed(20)"' >> /tmp/crontab && echo '0 4 * * * psql -d kairos -c "select purge()"' >>/tmp/crontab && su - postgres -c "crontab /tmp/crontab" && rm /tmp/crontab # buildkit |
| RUN /bin/sh -c adduser app # buildkit |
| RUN /bin/sh -c usermod -aG wheel app # buildkit |
| RUN /bin/sh -c usermod --password $(echo ''| openssl passwd -1 -stdin) app # buildkit |
| COPY src/streamlit/app/ /home/app # buildkit |
| RUN /bin/sh -c chmod 755 /home/app/* # buildkit |
| RUN /bin/sh -c chown -R app:wheel /home/app # buildkit |
| RUN /bin/sh -c mkdir /etc/supervisord.d # buildkit |
| RUN /bin/sh -c echo "[program:kairos]" > /etc/supervisord.d/kairos.ini && echo "command=python -m pykairos --bootstrap" >> /etc/supervisord.d/kairos.ini && echo "killasgroup=true" >> /etc/supervisord.d/kairos.ini # buildkit |
| RUN /bin/sh -c echo "[program:app]" > /etc/supervisord.d/app.ini && echo "command=streamlit run /home/app/home.py --server.port=8501 --server.address=0.0.0.0 --server.sslCertFile=/certificates/kairos.crt --server.sslKeyFile=/certificates/kairos.key" >> /etc/supervisord.d/app.ini && echo "killasgroup=true" >> /etc/supervisord.d/app.ini # buildkit |
| RUN /bin/sh -c echo_supervisord_conf > /etc/supervisord.conf # buildkit |
| RUN /bin/sh -c sed -i 's/nodaemon=false/nodaemon=true/' /etc/supervisord.conf # buildkit |
| RUN /bin/sh -c sed -i 's:logfile=/tmp/supervisord.log:logfile=/var/log/supervisord.log:' /etc/supervisord.conf # buildkit |
| RUN /bin/sh -c sed -i 's/;[include]/[include]/' /etc/supervisord.conf # buildkit |
| RUN /bin/sh -c sed -i 's:;files.*$:files=/etc/supervisord.d/*.ini:' /etc/supervisord.conf # buildkit |
| COPY certificates/* /certificates # buildkit |
| RUN /bin/sh -c rm -fr /tmp/oracle* # buildkit |
| RUN /bin/sh -c rm -fr /tmp/pgkairos*# # buildkit |
| RUN /bin/sh -c rm -fr /tmp/*.rpm # buildkit |
| WORKDIR / |
| CMD ["/bin/sh" "-c" "supervisord -c /etc/supervisord.conf"] |