diff --git a/Dockerfile b/Dockerfile index cbb96d2..eb5624a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 && \ @@ -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 diff --git a/requirements.txt b/requirements.txt index 0c7d487..2736514 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 @@ -10,4 +10,4 @@ pytz==2023.3.post1 PyYAML==6.0.1 six==1.16.0 tzdata==2023.4 -urllib3==1.26.18 \ No newline at end of file +urllib3==1.26.18