Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep curl in the image so it can be used for healthchecks in docker-compose #273

Closed
mcbeelen opened this issue Apr 12, 2023 · 0 comments · Fixed by #274
Closed

Keep curl in the image so it can be used for healthchecks in docker-compose #273

mcbeelen opened this issue Apr 12, 2023 · 0 comments · Fixed by #274

Comments

@mcbeelen
Copy link
Contributor

Feature request

While running 2 service via docker compose, where one is the plantuml-server and the other depends on the plantuml-server, I want to have a healthcheck on the plantuml-server.

Most suggestions for healthcheck suggest using curl or wget, but neither are present in the images.

version: "3.0"

services:

  plantuml-server:
    image: "plantuml/plantuml-server"
    ports:
      - "8080:8080"
    healthcheck:
      test: curl --fail http://localhost:8080/png/SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd9vt98pKi1IW80 || exit 1
      interval: 2s
      timeout: 3s
      retries: 5


  hello:
    image: "hello-world"
    depends_on:
      plantuml-server:
        condition: service_healthy

Output

dependency failed to start: container plantuml-plantuml-server-1 is unhealthy

Proposed solution

Currently the Dockerfile contains an instruction to run apt-get remove -y curl, which makes curl unavailable. My suggestion is to stop that remove.

Alternatives

Currently I build my own image on top of plantuml-server, where I reinstall curl.

My Dockerfile

FROM plantuml/plantuml-server:jetty

USER root
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        curl

USER jetty

Additional context

#220

mcbeelen added a commit to mcbeelen/plantuml-server that referenced this issue Apr 12, 2023
arnaudroques pushed a commit that referenced this issue Apr 12, 2023
HeinrichAD pushed a commit to HeinrichAD/plantuml-server that referenced this issue Jul 19, 2023
HeinrichAD pushed a commit to HeinrichAD/plantuml-server that referenced this issue Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant