Skip to content

Commit

Permalink
PMM-12641 Improve server build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Sep 30, 2024
1 parent bc51e0a commit fdefe3e
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions build/docker/server/Dockerfile.el9
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ ENV LC_ALL=en_US.utf8
ENV GF_PLUGIN_DIR=/srv/grafana/plugins
ENV PS1="[\u@\h \W] # "

LABEL org.opencontainers.image.created ${BUILD_DATE}
LABEL org.opencontainers.image.licenses AGPL-3.0
LABEL org.opencontainers.image.title Percona Monitoring and Management
LABEL org.opencontainers.image.vendor Percona LLC
LABEL org.opencontainers.image.version ${VERSION}

EXPOSE 8080 8443

WORKDIR /opt

RUN microdnf -y install epel-release && \
Expand All @@ -38,10 +30,21 @@ COPY pmm-client.tar.gz /tmp/
RUN install -T -p -m 644 /opt/ansible/ansible.cfg /etc/ansible/ansible.cfg && \
ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm-docker/main.yml -e "pmm_running_in_docker=true" && \
ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm-docker/update.yml -e "pmm_running_in_docker=true" && \
ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm/post-build-actions.yml -e "pmm_running_in_docker=true"
ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm/post-build-actions.yml -e "pmm_running_in_docker=true" && \
sed -i '/^assumeyes/d' /etc/dnf/dnf.conf

LABEL org.opencontainers.image.created ${BUILD_DATE}
LABEL org.opencontainers.image.licenses AGPL-3.0
LABEL org.opencontainers.image.title Percona Monitoring and Management
LABEL org.opencontainers.image.vendor Percona LLC
LABEL org.opencontainers.image.version ${VERSION}

USER pmm

VOLUME [ "/srv" ]

EXPOSE 8080 8443

HEALTHCHECK --interval=3s --timeout=2s --start-period=10s --retries=3 CMD curl -sf http://127.0.0.1:8080/v1/server/readyz

CMD ["/opt/entrypoint.sh"]

0 comments on commit fdefe3e

Please sign in to comment.