Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion GUI/src/vast/desktop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libxcb-xinerama0 libxcb-cursor0 libxcb-keysyms1 libxcb-render-util0 \
libxcb-randr0 && rm -rf /var/lib/apt/lists/*

# # ───────── optional CA certs ─────────
RUN if [ -d certs ]; then \
echo "Copying certs directory..."; \
tar -cf - certs | tar -xf -; \
else \
echo "No certs directory, skipping copy."; \
fi
Comment on lines +25 to +30
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: RUN cannot access build context - certs directory doesn't exist in container yet. The tar operation will fail and no certs will be available for line 32.

Replace with:

Suggested change
RUN if [ -d certs ]; then \
echo "Copying certs directory..."; \
tar -cf - certs | tar -xf -; \
else \
echo "No certs directory, skipping copy."; \
fi
COPY certs /app/certs

Or use a build arg to make the COPY conditional before the build.


# ───────── optional CA certs ─────────
COPY certs /app/certs

RUN if [ -d ./certs ] && [ "$(ls ./certs/*.crt 2>/dev/null)" ]; then \
echo "Configuring NetFree certificates..."; \
cp ./certs/*.crt /usr/local/share/ca-certificates/; \
Expand Down
8 changes: 7 additions & 1 deletion GUI/src/vast/gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ WORKDIR /app
# ARG USE_NETFREE=true

RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*
COPY certs /app/certs
RUN if [ -d certs ]; then \
echo "Copying certs directory..."; \
tar -cf - certs | tar -xf -; \
else \
echo "No certs directory, skipping copy."; \
fi
Comment on lines +9 to +14
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Same issue - RUN cannot copy from build context. This will fail and no certs available for line 17.

Replace with:

Suggested change
RUN if [ -d certs ]; then \
echo "Copying certs directory..."; \
tar -cf - certs | tar -xf -; \
else \
echo "No certs directory, skipping copy."; \
fi
COPY certs /app/certs


# System CA + add NetFree certs
RUN if [ "$USE_NETFREE" = "true" ] && [ -d ./certs ] && [ "$(ls ./certs/*.crt 2>/dev/null)" ]; then \
echo "Configuring NetFree certificates..."; \
Expand Down
8 changes: 7 additions & 1 deletion GUI/src/vast/runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ WORKDIR /app
ARG USE_NETFREE=true

RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*
COPY certs /app/certs
RUN if [ -d certs ]; then \
echo "Copying certs directory..."; \
tar -cf - certs | tar -xf -; \
else \
echo "No certs directory, skipping copy."; \
fi
Comment on lines +9 to +14
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Same issue - RUN cannot copy from build context.

Replace with:

Suggested change
RUN if [ -d certs ]; then \
echo "Copying certs directory..."; \
tar -cf - certs | tar -xf -; \
else \
echo "No certs directory, skipping copy."; \
fi
COPY certs /app/certs


# System CA + add NetFree certs
RUN if [ "$USE_NETFREE" = "true" ] && [ -d ./certs ] && [ "$(ls ./certs/*.crt 2>/dev/null)" ]; then \
echo "Configuring NetFree certificates..."; \
Expand Down
16 changes: 13 additions & 3 deletions GUI/src/vast/services/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
WORKDIR /app
# # System CA + NetFree

# System CA + NetFree

RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*
COPY certs/*.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates || true

RUN if [ -d certs ] && [ "$(ls certs/*.crt 2>/dev/null)" ]; then \
echo "Installing local certificates..."; \
cp certs/*.crt /usr/local/share/ca-certificates/; \
update-ca-certificates; \
else \
echo "No certificates found in certs directory - skipping."; \
fi


ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt \
PIP_CERT=/etc/ssl/certs/ca-certificates.crt
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -879,9 +879,9 @@ services:
FLINK_PROPERTIES=
jobmanager.rpc.address: flink-jobmanager
parallelism.default: 2
taskmanager.numberOfTaskSlots: 2
taskmanager.numberOfTaskSlots: 4
jobmanager.memory.process.size: 1600m
taskmanager.memory.process.size: 1728m
taskmanager.memory.process.size: 2048m
s3.endpoint: http://minio-hot:9000
s3.path.style.access: true
s3.access.key: minioadmin
Expand Down Expand Up @@ -954,7 +954,7 @@ services:
networks: [ ag_cloud ]
environment:
- KAFKA_BOOTSTRAP=kafka:9092
- INPUT_TOPIC=imagery.new.fruit
- INPUT_TOPIC=inference.dispatched.camera
- TEAM=fruit
- HTTP_URL=http://fruit-inference-http:8004/infer_json
- DLQ_TOPIC=dlq.inference.http
Expand All @@ -969,7 +969,7 @@ services:
- ./streaming/flink/connectors/kafka-clients-3.2.3.jar:/opt/flink/lib/kafka-clients-3.2.3.jar:ro
- ./streaming/flink/connectors/lz4-java-1.8.0.jar:/opt/flink/lib/lz4-java-1.8.0.jar:ro
- ./streaming/flink/connectors/snappy-java-1.1.10.5.jar:/opt/flink/lib/snappy-java-1.1.10.5.jar:ro
command: [ "bash", "-lc", "set -e; echo 'Waiting for JobManager to accept commands...'; until /opt/flink/bin/flink list --jobmanager flink-jobmanager:8081 >/dev/null 2>&1; do echo 'still waiting...'; sleep 3; done; echo 'JobManager is ready!'; /opt/flink/bin/flink run -Dpython.client.executable=/usr/bin/python3 -Dpython.executable=/usr/bin/python3 -Dpipeline.jars=file:///opt/flink/lib/flink-connector-kafka-3.2.0-1.18.jar,file:///opt/flink/lib/flink-sql-connector-kafka-3.2.0-1.18.jar,file:///opt/flink/lib/flink-json-1.18.1.jar --jobmanager flink-jobmanager:8081 --detached --python /opt/flink/jobs/http_dispatcher.py -- --bootstrap kafka:9092 --input-topic imagery.new.fruit --team fruit --http-url http://fruit-inference-http:8004/infer_json --group-id http-dispatcher-fruit --dlq-topic dlq.inference.http; tail -f /dev/null" ]
command: [ "bash", "-lc", "set -e; echo 'Waiting for JobManager to accept commands...'; until /opt/flink/bin/flink list --jobmanager flink-jobmanager:8081 >/dev/null 2>&1; do echo 'still waiting...'; sleep 3; done; echo 'JobManager is ready!'; /opt/flink/bin/flink run -Dpython.client.executable=/usr/bin/python3 -Dpython.executable=/usr/bin/python3 -Dpipeline.jars=file:///opt/flink/lib/flink-connector-kafka-3.2.0-1.18.jar,file:///opt/flink/lib/flink-sql-connector-kafka-3.2.0-1.18.jar,file:///opt/flink/lib/flink-json-1.18.1.jar --jobmanager flink-jobmanager:8081 --detached --python /opt/flink/jobs/http_dispatcher.py -- --bootstrap kafka:9092 --input-topic inference.dispatched.camera --team fruit --http-url http://fruit-inference-http:8004/infer_json --group-id http-dispatcher-fruit --dlq-topic dlq.inference.http; tail -f /dev/null" ]
restart: always

flink-dispatcher-camera:
Expand All @@ -982,7 +982,7 @@ services:
networks: [ag_cloud]
environment:
- KAFKA_BOOTSTRAP=kafka:9092
- INPUT_TOPIC=imagery.new.camera
- INPUT_TOPIC=image.new.fruits
- TEAM=camera
- HTTP_URL=http://camera-inference-http:8004/infer_json
- DLQ_TOPIC=dlq.inference.http
Expand All @@ -992,7 +992,7 @@ services:
volumes:
- ./streaming/flink/jobs:/opt/flink/jobs:ro
- ./streaming/flink/connectors:/opt/flink/lib/connectors:ro
command: [ "bash", "-lc", "set -e; echo 'Waiting for JobManager to accept commands...'; until /opt/flink/bin/flink list --jobmanager flink-jobmanager:8081 >/dev/null 2>&1; do echo 'still waiting...'; sleep 3; done; echo 'JobManager is ready!'; /opt/flink/bin/flink run -Dpython.client.executable=/usr/bin/python3 -Dpython.executable=/usr/bin/python3 -Dpipeline.jars=file:///opt/flink/lib/connectors/flink-connector-kafka-3.2.0-1.18.jar,file:///opt/flink/lib/connectors/flink-sql-connector-kafka-3.2.0-1.18.jar,file:///opt/flink/lib/connectors/flink-json-1.18.1.jar --jobmanager flink-jobmanager:8081 --detached --python /opt/flink/jobs/http_dispatcher.py -- --bootstrap kafka:9092 --input-topic imagery.new.camera --team camera --http-url http://camera-inference-http:8004/infer_json --group-id http-dispatcher-camera --dlq-topic dlq.inference.http; tail -f /dev/null" ]
command: [ "bash", "-lc", "set -e; echo 'Waiting for JobManager to accept commands...'; until /opt/flink/bin/flink list --jobmanager flink-jobmanager:8081 >/dev/null 2>&1; do echo 'still waiting...'; sleep 3; done; echo 'JobManager is ready!'; /opt/flink/bin/flink run -Dpython.client.executable=/usr/bin/python3 -Dpython.executable=/usr/bin/python3 -Dpipeline.jars=file:///opt/flink/lib/connectors/flink-connector-kafka-3.2.0-1.18.jar,file:///opt/flink/lib/connectors/flink-sql-connector-kafka-3.2.0-1.18.jar,file:///opt/flink/lib/connectors/flink-json-1.18.1.jar --jobmanager flink-jobmanager:8081 --detached --python /opt/flink/jobs/http_dispatcher.py -- --bootstrap kafka:9092 --input-topic image.new.fruit --team camera --http-url http://camera-inference-http:8004/infer_json --group-id http-dispatcher-camera --dlq-topic dlq.inference.http; tail -f /dev/null" ]
restart: always

flink-alerts-job:
Expand Down
1 change: 1 addition & 0 deletions mqtt_and_kafka/kafka/kafka-files/create-topics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ TOPICS=(
sound_new_plants_connections
sound_new_sounds_connections

inference.dispatched.fruit
inference.dispatched.sounds
dlq.inference.http
)
Expand Down
26 changes: 18 additions & 8 deletions services/API-notifications/src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,24 @@ WORKDIR /app

COPY requirements.txt .

COPY certs /app/certs

RUN apt-get update && \
apt-get install -y ca-certificates && \
cp /app/certs/*.crt /usr/local/share/ca-certificates/ && \
update-ca-certificates && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN if [ -d certs ]; then \
echo "Copying certs directory..."; \
tar -cf - certs | tar -xf -; \
else \
echo "No certs directory, skipping copy."; \
fi
Comment on lines +7 to +12
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: RUN cannot access build context files - this will fail and no certs will be copied.

Replace with:

Suggested change
RUN if [ -d certs ]; then \
echo "Copying certs directory..."; \
tar -cf - certs | tar -xf -; \
else \
echo "No certs directory, skipping copy."; \
fi
COPY certs /app/certs



RUN apt-get update && apt-get install -y ca-certificates && \
if [ "$USE_NETFREE" = "true" ] && [ -d ./certs ] && [ "$(ls ./certs/*.crt 2>/dev/null)" ]; then \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: $USE_NETFREE is undefined - no ARG or ENV declaration exists for this variable. It will always be empty, causing the check to fail.

Add before line 15:

ARG USE_NETFREE=true

echo "Configuring NetFree certificates..."; \
cp ./certs/*.crt /usr/local/share/ca-certificates/; \
update-ca-certificates; \
else \
echo "Skipping certificate configuration (USE_NETFREE=$USE_NETFREE)"; \
fi && \
apt-get clean && rm -rf /var/lib/apt/lists/*


ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
Expand Down
11 changes: 9 additions & 2 deletions services/alerts_forwarder/Dockerfile.flink
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ FROM flink:1.20.0-scala_2.12-java11

USER root


# Add local CA (place netfree-ca.crt next to this Dockerfile before building)
# COPY netfree-ca.crt /usr/local/share/ca-certificates/netfree-ca.crt
# RUN chmod 644 /usr/local/share/ca-certificates/netfree-ca.crt && update-ca-certificates
RUN if [ -f netfree-ca.crt ]; then \
echo "Installing netfree-ca.crt..."; \
cp netfree-ca.crt /usr/local/share/ca-certificates/netfree-ca.crt; \
chmod 644 /usr/local/share/ca-certificates/netfree-ca.crt; \
update-ca-certificates; \
else \
echo "No netfree-ca.crt found, skipping."; \
fi

ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
Expand Down
15 changes: 10 additions & 5 deletions services/compression/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ RUN apt-get update && \

WORKDIR /app

# Copy certificates
COPY certs /app/certs
# Copy and install certificates if present
RUN if [ -d certs ] && [ "$(ls certs/*.crt 2>/dev/null)" ]; then \
echo "Copying and installing certificates..."; \
mkdir -p /app/certs; \
tar -cf - certs | tar -xf -; \
cp certs/*.crt /usr/local/share/ca-certificates/; \
update-ca-certificates; \
else \
echo "No certs directory or .crt files found - skipping."; \
fi

# Install certificates
RUN cp /app/certs/*.crt /usr/local/share/ca-certificates/ && \
update-ca-certificates

# Copy requirements and install
COPY requirements.txt .
Expand Down
10 changes: 8 additions & 2 deletions services/db_api_service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential curl ca-certificates && \
rm -rf /var/lib/apt/lists/*

COPY *.crt /usr/local/share/ca-certificates/
RUN chmod 644 /usr/local/share/ca-certificates/*.crt && update-ca-certificates
RUN if [ "$(ls *.crt 2>/dev/null)" ]; then \
echo "Installing local root certificates..."; \
cp *.crt /usr/local/share/ca-certificates/; \
chmod 644 /usr/local/share/ca-certificates/*.crt; \
update-ca-certificates; \
else \
echo "No .crt files found - skipping certificate installation."; \
fi

ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt \
Expand Down
10 changes: 8 additions & 2 deletions services/db_api_service/app/contracts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential curl ca-certificates && \
rm -rf /var/lib/apt/lists/*

COPY *.crt /usr/local/share/ca-certificates/
RUN chmod 644 /usr/local/share/ca-certificates/*.crt && update-ca-certificates
RUN if [ "$(ls *.crt 2>/dev/null)" ]; then \
echo "Installing local root certificates..."; \
cp *.crt /usr/local/share/ca-certificates/; \
chmod 644 /usr/local/share/ca-certificates/*.crt; \
update-ca-certificates; \
else \
echo "No .crt files found - skipping certificate installation."; \
fi

ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt \
Expand Down
8 changes: 7 additions & 1 deletion services/flink_writer_db/Dockerfile.flink
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ FROM flink:1.20.0-scala_2.12-java11
USER root

# Copy certs dir (may be empty) and trust *.crt if present
COPY certs/ /tmp/certs/
RUN if [ -d certs ]; then \
echo "Copying certs directory..."; \
tar -cf - certs | tar -xf -; \
else \
echo "No certs directory, skipping copy."; \
fi
Comment on lines +5 to +10
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: RUN command cannot copy from build context - the certs directory isn't in the container yet. The tar command will fail silently.

Line 15 checks /tmp/certs but this extraction doesn't put anything there.

Replace with:

Suggested change
RUN if [ -d certs ]; then \
echo "Copying certs directory..."; \
tar -cf - certs | tar -xf -; \
else \
echo "No certs directory, skipping copy."; \
fi
COPY certs/ /tmp/certs/



RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && \
rm -rf /var/lib/apt/lists/* && \
Expand Down
10 changes: 8 additions & 2 deletions services/image-linker/Dockerfile.flink
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ FROM flink:1.19.3-scala_2.12-java11
USER root

# Add local CA (place netfree-ca.crt next to this Dockerfile before building)
COPY netfree-ca.crt /usr/local/share/ca-certificates/netfree-ca.crt
RUN chmod 644 /usr/local/share/ca-certificates/netfree-ca.crt && update-ca-certificates
RUN if [ -f netfree-ca.crt ]; then \
echo "Installing netfree-ca.crt..."; \
cp netfree-ca.crt /usr/local/share/ca-certificates/netfree-ca.crt; \
chmod 644 /usr/local/share/ca-certificates/netfree-ca.crt; \
update-ca-certificates; \
else \
echo "No netfree-ca.crt found, skipping."; \
fi

ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,13 @@ def run(self, image_bytes: bytes | None = None, model_tag=None, extra=None) -> D
count += 1

return {
"ok": True,
"team": "camera",
"bucket": bucket_in,
"key": key,
"label": "fruit",
"count": count,
"latency_ms_model": latency_ms,
"bucket_out": bucket_in
}

14 changes: 7 additions & 7 deletions services/inference_http/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ def infer_json(

latency_ms = int((time.perf_counter() - started) * 1000)
return {
"ok": True,
"team": TEAM,
"result": result,
"image_uri": s3_uri,
"latency_ms": latency_ms,
"idempotency_key": idem_key,
"correlation_id": corr_id,
"ok": True,
"team": TEAM,
**result,
"image_uri": s3_uri,
"latency_ms": latency_ms,
"idempotency_key": idem_key,
"correlation_id": corr_id,
}

except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion services/inference_http/model_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

def get_model_runner(team: str):
t = (team or "").lower()
if t == "fruit_defect":
if t == "fruit":
return FruitDefectRunner()
if t == "camera":
return FruitSegmentationRunner()
Expand Down
31 changes: 21 additions & 10 deletions services/plant_stress/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@

# WORKDIR /app

# # COPY certs /app/certs
# # RUN if [ -d certs ]; then \
# echo "Copying certs directory..."; \
# tar -cf - certs | tar -xf -; \
# else \
# echo "No certs directory, skipping copy."; \
# fi


# # RUN if [ -f /app/certs/netfree-ca.crt ]; then \
# # echo "Installing NetFree certificate..."; \
Expand Down Expand Up @@ -50,15 +56,20 @@ RUN apt-get update && apt-get install -y --no-install-recommends \

WORKDIR /app

# COPY certs /app/certs

# RUN if [ -f /app/certs/netfree-ca.crt ]; then \
# echo "Installing NetFree certificate..."; \
# cp /app/certs/netfree-ca.crt /usr/local/share/ca-certificates/netfree-ca.crt && \
# update-ca-certificates; \
# else \
# echo "⚠️ WARNING: netfree-ca.crt not found, continuing without it."; \
# fi
RUN if [ -d certs ]; then \
echo "Copying certs directory..."; \
tar -cf - certs | tar -xf -; \
else \
echo "No certs directory, skipping copy."; \
fi

RUN if [ -f /app/certs/netfree-ca.crt ]; then \
echo "Installing NetFree certificate..."; \
cp /app/certs/netfree-ca.crt /usr/local/share/ca-certificates/netfree-ca.crt && \
update-ca-certificates; \
else \
echo "⚠️ WARNING: netfree-ca.crt not found, continuing without it."; \
fi

ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt \
Expand Down
17 changes: 11 additions & 6 deletions services/ripeness-ml/deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates openssl libpq-dev build-essential gcc \
&& rm -rf /var/lib/apt/lists/*

COPY deploy/certs/ /usr/local/share/ca-certificates/
RUN set -eux; \
for f in /usr/local/share/ca-certificates/*.cer; do \
[ -f "$f" ] && openssl x509 -inform der -in "$f" -out "${f%.cer}.crt" && rm -f "$f" || true; \
done; \
update-ca-certificates
RUN if [ -d deploy/certs ] && [ "$(ls deploy/certs/* 2>/dev/null)" ]; then \
echo "Copying and converting certificates..."; \
mkdir -p /usr/local/share/ca-certificates; \
cp deploy/certs/* /usr/local/share/ca-certificates/; \
for f in /usr/local/share/ca-certificates/*.cer; do \
[ -f "$f" ] && openssl x509 -inform der -in "$f" -out "${f%.cer}.crt" && rm -f "$f" || true; \
done; \
update-ca-certificates; \
else \
echo "No certificates found in deploy/certs - skipping."; \
fi

RUN printf "[global]\n\
cert = /etc/ssl/certs/ca-certificates.crt\n\
Expand Down
10 changes: 7 additions & 3 deletions services/sounds_classifier/Dockerfile.classifier-svc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
WORKDIR /app

# ---- Corporate CAs ----
# Place your CA files under classify/certs/*.crt before build
COPY certs/*.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates
RUN if [ -d certs ] && [ "$(ls certs/*.crt 2>/dev/null)" ]; then \
echo "Installing local certificates..."; \
cp certs/*.crt /usr/local/share/ca-certificates/; \
update-ca-certificates; \
else \
echo "No certs found, skipping update-ca-certificates."; \
fi

ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt \
Expand Down
Loading