-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
86 lines (58 loc) · 2.25 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# ARG BASE_IMAGE=debian:11.11-slim
ARG BASE_IMAGE=debian:12.7-slim
FROM ${BASE_IMAGE} AS builder
ENV REFRESHED_AT=2024-08-16
# ACCEPT_EULA and SENZING_ACCEPT_EULA to be replaced by --build-arg
ARG ACCEPT_EULA=no
ARG SENZING_ACCEPT_EULA=no
ARG SENZING_APT_INSTALL_PACKAGE="senzingapi-runtime"
ARG SENZING_APT_REPOSITORY_URL="https://senzing-production-apt.s3.amazonaws.com/senzingrepo_2.0.0-1_all.deb"
# -----------------------------------------------------------------------------
# Stage: builder
# -----------------------------------------------------------------------------
# Run as "root" for system installation.
USER root
# Eliminate warning messages.
ENV TERM=xterm
# Install packages via apt-get.
RUN apt-get update \
&& apt-get -y install \
curl \
gnupg \
tree \
wget
# Install Senzing repository index.
RUN curl \
--output /senzingrepo_2.0.0-1_all.deb \
${SENZING_APT_REPOSITORY_URL} \
&& apt-get -y install /senzingrepo_2.0.0-1_all.deb \
&& apt-get update \
&& rm /senzingrepo_2.0.0-1_all.deb
# Install Senzing package.
RUN apt-get -y install ${SENZING_APT_INSTALL_PACKAGE}
RUN tree /opt/senzing
HEALTHCHECK CMD sudo yum list installed | grep ${SENZING_APT_INSTALL_PACKAGE}
# Support for msodbcsql17.
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/debian/11/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update \
&& apt-get -y install msodbcsql17 || true \
&& mkdir -p /opt/microsoft
# -----------------------------------------------------------------------------
# Stage: Final
# -----------------------------------------------------------------------------
FROM ${BASE_IMAGE} AS final
ENV REFRESHED_AT=2024-08-16
LABEL Name="senzing/installer" \
Maintainer="[email protected]" \
Version="2.0.0"
# Run as non-root container
USER 1001
# Copy files from repository.
COPY ./rootfs /
# Copy files from prior stage.
COPY --from=builder /opt/senzing /opt/local-senzing
COPY --from=builder /opt/microsoft /opt/local-microsoft
COPY --from=builder /etc/opt/senzing /opt/local-senzing/etc/opt/senzing
# Runtime execution: Copy the baked in files to mounted volume(s)
ENTRYPOINT ["/app/docker-entrypoint.sh"]