From f4bcef64dd1668ff0e294e4b13a222e58e4a394a Mon Sep 17 00:00:00 2001 From: Mahasri Kalavala Date: Tue, 31 Jan 2023 11:13:41 -0500 Subject: [PATCH] added curl command to aid with healthchecks when running this using docker-compose, we could automatically do health check if there is a curl command available inside the container. ``` streamer: container_name: camera_streamer image: gihad/streamer restart: always environment: - PARAMETERS=xxx volumes: - /tmp/stream:/tmp/stream ports: - 8080:80 healthcheck: test: [ "CMD", "curl", "-f", "http://192.168.xxx.xxx:8080/mycamerafeed.m3u8" ] interval: 1m timeout: 10s retries: 3 ``` --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index d6df6dd..71a0935 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ FROM alpine:3.7 # Install nginx and ffmpeg RUN apk add --update nginx ffmpeg && rm -rf /var/cache/apk/* && mkdir /tmp/stream +RUN apk add curl COPY nginx/nginx.conf /etc/nginx/nginx.conf COPY ./startup.sh /