Skip to content

Commit

Permalink
PMM-12530 use an interim Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Dec 13, 2023
1 parent 0181a73 commit 600c2b0
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/docker/server/Dockerfile.el9
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ RUN microdnf -y install epel-release && \
yum \
vi

COPY entrypoint.sh /opt/entrypoint.sh
COPY RPMS /tmp/RPMS
COPY gitCommit /tmp/gitCommit

Expand All @@ -36,12 +37,11 @@ COPY pmm-client.tar.gz /tmp/
COPY ansible /opt/ansible
# NOTE: this needs to be refactored, since some of the playbooks are duplicates
RUN cp -r /opt/ansible/roles /opt/ansible/pmm-docker/roles

RUN ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm-docker/main.yml \
&& ansible-playbook -vvv -i 'localhost,' -c local /usr/share/pmm-update/ansible/playbook/tasks/update.yml \
&& ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm/post-build-actions.yml

COPY entrypoint.sh /opt/entrypoint.sh

HEALTHCHECK --interval=3s --timeout=2s --start-period=10s --retries=3 CMD curl -f http://127.0.0.1:8080/v1/readyz || exit 1

CMD ["/opt/entrypoint.sh"]
47 changes: 47 additions & 0 deletions build/docker/server/Dockerfile.el9.v3
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM oraclelinux:9-slim

ARG VERSION
ARG BUILD_DATE

ENV LANG=en_US.utf8
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 && \
microdnf -y install ansible-core \
ansible-collection-community-general \
ansible-collection-community-postgresql \
ansible-collection-ansible-posix \
glibc-langpack-en \
yum \
vi

COPY entrypoint.sh /opt/entrypoint.sh
COPY RPMS /tmp/RPMS
COPY gitCommit /tmp/gitCommit

# Use COPY as we want to unarchive it with ansible
COPY pmm-client.tar.gz /tmp/

COPY ansible /opt/ansible
# NOTE: this needs to be refactored, since some of the playbooks are duplicates
RUN cp -r /opt/ansible/roles /opt/ansible/pmm-docker/roles

# RUN ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm-docker/main.yml \
# && ansible-playbook -vvv -i 'localhost,' -c local /usr/share/pmm-update/ansible/playbook/tasks/update.yml \
# && ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm/post-build-actions.yml

HEALTHCHECK --interval=3s --timeout=2s --start-period=10s --retries=3 CMD curl -f http://127.0.0.1:8080/v1/readyz || exit 1

CMD ["/opt/entrypoint.sh"]

0 comments on commit 600c2b0

Please sign in to comment.