You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
812B

  1. FROM fedora:latest
  2. COPY . /usr/src/pgcluu
  3. WORKDIR /usr/src/pgcluu
  4. Run dnf install -y \
  5. perl \
  6. perl-Getopt-Long.noarch \
  7. perl-Storable \
  8. postgresql \
  9. && dnf clean all
  10. CMD [ "perl", "./Makefile.PL" ]
  11. CMD [ "make" ]
  12. CMD [ "make" "install" ]
  13. ENV PGCLUU_STATS_DIR /tmp/pgcluu_stats
  14. ENV PGCLUU_REPORT_DIR /tmp/pgcluu_report
  15. ENV PATH /usr/src/pgcluu:$PATH
  16. ENV POSTGRES_USERNAME postgres
  17. ENV POSTGRES_PASSWORD postgres
  18. ENV POSTGRES_DB postgres
  19. ENV POSTGRES_HOSTNAME postgres
  20. Run mkdir -p $PGCLUU_STATS_DIR $PGCLUU_REPORT_DIR
  21. ENTRYPOINT echo -e "\t Hit CTRL-\ (SIGQUIT) to stop the collection and generate the report" ; \
  22. pgcluu_collectd -i 60 $PGCLUU_STATS_DIR -h $POSTGRES_HOSTNAME -U $POSTGRES_USERNAME -d $POSTGRES_DB ; \
  23. pgcluu -o $PGCLUU_REPORT_DIR $PGCLUU_STATS_DIR