Skip to content

Commit

Permalink
smaller base image
Browse files Browse the repository at this point in the history
  • Loading branch information
womullan committed Aug 20, 2024
1 parent a4cbe4b commit d1a2c52
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Dockerfile.consume-kafka
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
ARG RUBINENV_VERSION=8.0.0
FROM lsstsqre/newinstall:${RUBINENV_VERSION}
FROM FROM lsstsqre/centos:7-stack-lsst_distrib-${OBS_LSST_VERSION}
ARG OBS_LSST_VERSION
ENV OBS_LSST_VERSION=${OBS_LSST_VERSION:-w_2024_06}
USER lsst

RUN source loadLSST.bash && mamba install aiokafka httpx
RUN source loadLSST.bash && pip install kafkit
RUN source loadLSST.bash && eups distrib install -t "${OBS_LSST_VERSION}" obs_lsst
COPY src/obsloctap/consume-kafka.py ./obsloctap/
RUN source loadLSST.bash && pip install kafkit aiokafka httpx

WORKDIR /home/lsst/
COPY --chown=lsst . ./obsloctap/
WORKDIR /home/lsst/obsloctap/
RUN source /opt/lsst/software/stack/loadLSST.bash && pip install -e .

# Environment variables that must be set:
# POSTGRES_URL: SQLAlchemy connection URL
Expand All @@ -18,4 +22,4 @@ COPY src/obsloctap/consume-kafka.py ./obsloctap/
# KAFKA_GROUP_ID: name of consumer group, default is "obsloctap-consumer"
# KAFKA_USERNAME: username for SASL_PLAIN authentication, default is "obsloctap"

ENTRYPOINT [ "bash", "-c", "source loadLSST.bash; setup obs_lsst; python ./obsloctap/consume-kafka.py" ]
ENTRYPOINT [ "bash", "-c", "source loadLSST.bash; setup obs_lsst; python -m obsloctap.consume-kafka.py" ]

0 comments on commit d1a2c52

Please sign in to comment.