Skip to content

Commit

Permalink
Update the replication Dockerfile to use the base image
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMcCormick committed Jan 6, 2025
1 parent afec365 commit ef14e03
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions docker/Dockerfile.replication
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
FROM python:3.11.6-slim-bookworm
ARG BASE_IMAGE=lsst/ppdb-base:local
FROM ${BASE_IMAGE}

ENV DEBIAN_FRONTEND=noninteractive

# Update and install OS dependencies
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install --no-install-recommends git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Install required python build dependencies
RUN pip install --upgrade --no-cache-dir pip setuptools wheel uv

# Create the build directory
WORKDIR /build
COPY . /build

# Install requirements
RUN uv pip install --no-cache-dir --system cassandra-driver psycopg2-binary
RUN uv pip install --no-cache-dir --system -r requirements.txt

# Install the package
RUN uv pip install --no-cache-dir --system --no-deps .
# Install optional requirements
RUN uv pip install --no-cache-dir --system cassandra-driver

# Setup the application scripts
WORKDIR /app
Expand All @@ -37,8 +18,5 @@ ENV SDM_SCHEMAS_DIR=/app/sdm_schemas
COPY docker/scripts/entrypoint-replication.sh .
RUN chmod +x /app/entrypoint-replication.sh

# Remove the build directory
RUN rm -rf /build

# Run the wrapper script for the ppdb-replication command
CMD ["/app/entrypoint-replication.sh"]

0 comments on commit ef14e03

Please sign in to comment.