Skip to content

Commit

Permalink
Merge pull request #14 from jtaleric/update-docker
Browse files Browse the repository at this point in the history
Update Dockerfile w/ new Hunter integration
  • Loading branch information
shashank-boyapally authored Feb 12, 2024
2 parents c598081 + 4b88c84 commit 8d7515f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 27 deletions.
31 changes: 6 additions & 25 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
FROM python:3.12.1-slim-bullseye
FROM python:3.11.8-slim-bookworm
# So that STDOUT/STDERR is printed
ENV PYTHONUNBUFFERED="1"

# We create the default user and group to run unprivileged
ENV HUNTER_HOME /srv/hunter
WORKDIR ${HUNTER_HOME}

RUN groupadd --gid 8192 hunter && \
useradd --uid 8192 --shell /bin/false --create-home --no-log-init --gid hunter hunter && \
chown hunter:hunter ${HUNTER_HOME}

# First let's just get things updated.
# Install System dependencies
RUN apt-get update --assume-yes && \
Expand All @@ -24,26 +16,15 @@ RUN apt-get update --assume-yes && \
virtualenv \
&& rm -rf /var/lib/apt/lists/*

# Get poetry package
RUN curl -sSL https://install.python-poetry.org | python3 -
# Adding poetry to PATH
ENV PATH="/root/.local/bin/:$PATH"

RUN git clone https://github.com/datastax-labs/hunter.git ${HUNTER_HOME}

ENV PATH="${HUNTER_HOME}/bin:$PATH"
ENV PATH="~/bin:$PATH"

RUN --mount=type=ssh \
virtualenv --python python venv && \
. venv/bin/activate && \
poetry install -v && \
mkdir -p bin && \
ln -s ../venv/bin/hunter ${HUNTER_HOME}/bin
RUN python -m venv venv

COPY --chown=hunter:hunter . orion
ADD . orion/

RUN . venv/bin/activate && \
cd orion \
pip install setuptools && \
pip install -r requirements.txt && \
python setup.py install && \
ln -s ../venv/bin/orion ${HUNTER_HOME}/bin
ln -s ../venv/bin/orion ~/bin
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
hunter @ git+https://github.com/datastax-labs/hunter.git@8ff166979d000780ad548e49f006ef2a15d54123
hunter @ git+https://github.com/datastax-labs/hunter.git@v0.5.0
certifi==2023.11.17
click==8.1.7
elastic-transport==8.11.0
Expand All @@ -10,4 +10,4 @@ pytz==2023.3.post1
PyYAML==6.0.1
six==1.16.0
tzdata==2023.4
urllib3==1.26.18
urllib3==1.26.18

0 comments on commit 8d7515f

Please sign in to comment.