Skip to content

Commit

Permalink
#143 save point
Browse files Browse the repository at this point in the history
  • Loading branch information
roncewind committed Sep 26, 2023
1 parent 32f663a commit 3a5fd3e
Showing 1 changed file with 1 addition and 76 deletions.
77 changes: 1 addition & 76 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,82 +1,7 @@
ARG BASE_IMAGE=debian:11.7-slim@sha256:924df86f8aad741a0134b2de7d8e70c5c6863f839caadef62609c1be1340daf5
FROM ${BASE_IMAGE} AS builder

ENV REFRESHED_AT=2023-06-15

LABEL Name="senzing/stream-loader" \
Maintainer="support@senzing.com" \
Version="1.9.2"

# Run as "root" for system installation.
USER root

RUN apt-get update \
&& apt-get -y install \
python3 \
python3-dev \
python3-venv \
python3-pip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# create and activate virtual environment
RUN python3 -m venv /app/venv
ENV PATH="/app/venv/bin:$PATH"

# Install packages via PIP.
COPY requirements.txt .
RUN pip3 install --upgrade pip \
&& pip3 install -r requirements.txt \
&& rm /requirements.txt

##
# create the runtime image
FROM ${BASE_IMAGE} AS runner

# 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 \
librdkafka-dev \
libxml2 \
python3 \
python3-venv \
postgresql-client \
unixodbc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Copy files from repository.
COPY ./rootfs /
COPY ./stream-loader.py /app/

# Copy python virtual environment from the builder image
COPY --from=builder /app/venv /app/venv

# Make non-root container.
USER 1001

# make sure all messages always reach console
ENV PYTHONUNBUFFERED=1

# activate virtual environment
ENV VIRTUAL_ENV=/app/venv
ENV PATH="/app/venv/bin:$PATH"

# Runtime execution.
ENV SENZING_DOCKER_LAUNCHED=true
ENV LD_LIBRARY_PATH=/opt/senzing/g2/lib:/opt/senzing/g2/lib/debian:/opt/IBM/db2/clidriver/lib
ENV PATH=${PATH}:/opt/senzing/g2/python:/opt/IBM/db2/clidriver/adm:/opt/IBM/db2/clidriver/bin
ENV PYTHONPATH=/opt/senzing/g2/python
ENV SENZING_ETC_PATH=/etc/opt/senzing

WORKDIR /app
ENTRYPOINT ["/app/stream-loader.py"]
CMD ls

0 comments on commit 3a5fd3e

Please sign in to comment.