-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
46 lines (30 loc) · 884 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
ARG BASE_IMAGE=debian:11.9-slim@sha256:acc5810124f0929ab44fc7913c0ad936b074cbd3eadf094ac120190862ba36c4
FROM ${BASE_IMAGE}
ENV REFRESHED_AT=2024-06-24
LABEL Name="senzing/stream-producer" \
Maintainer="support@senzing.com" \
Version="1.8.11"
HEALTHCHECK CMD ["/app/healthcheck.sh"]
# Run as "root" for system installation.
USER root
# Install packages via apt.
RUN apt-get update \
&& apt-get -y install \
librdkafka-dev \
python3-dev \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Install packages via PIP.
COPY requirements.txt ./
RUN pip3 install --upgrade pip \
&& pip3 install -r requirements.txt \
&& rm requirements.txt
# Copy files from repository.
COPY ./rootfs /
COPY ./stream-producer.py /app/
# Make non-root container.
USER 1001
# Runtime execution.
ENV SENZING_DOCKER_LAUNCHED=true
WORKDIR /app
ENTRYPOINT ["/app/stream-producer.py"]