-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
57 lines (39 loc) · 1.08 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
ARG BASE_IMAGE=senzing/senzingapi-runtime:3.12.5
FROM ${BASE_IMAGE}
ENV REFRESHED_AT=2025-02-05
LABEL Name="senzing/init-postgresql" \
Maintainer="support@senzing.com" \
Version="1.1.17"
# Define health check.
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 \
gnupg2 \
libaio1 \
libodbc1 \
odbc-postgresql \
python3 \
python3-pip \
wget \
&& 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 ./init-postgresql.py /app/
# Set environment variables.
ENV LD_LIBRARY_PATH=/opt/senzing/g2/lib:/opt/senzing/g2/lib/debian
ENV PATH=${PATH}:/opt/senzing/g2/python
ENV PYTHONPATH=/opt/senzing/g2/sdk/python
ENV SENZING_DOCKER_LAUNCHED=true
# Make non-root container.
USER 1001:1001
# Runtime execution.
WORKDIR /app
ENTRYPOINT ["/app/init-postgresql.py"]