Skip to content

Commit

Permalink
Add: Install pipx in workdir
Browse files Browse the repository at this point in the history
  • Loading branch information
mathisschiwy authored and greenbonebot committed Sep 13, 2024
1 parent d8eef03 commit ed504cd
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ COPY . /source
WORKDIR /source

RUN apt-get update && \
apt-get install --no-install-recommends --no-install-suggests -y \
gosu \
python3 \
python-is-python3 \
ssh-client \
pipx && \
apt-get remove --purge --auto-remove -y && \
rm -rf /var/lib/apt/lists/*
apt-get install --no-install-recommends --no-install-suggests -y \
gosu \
python3 \
python-is-python3 \
ssh-client \
pipx && \
apt-get remove --purge --auto-remove -y && \
rm -rf /var/lib/apt/lists/*

RUN pipx install poetry

Expand All @@ -27,24 +27,27 @@ ENV PIP_NO_CACHE_DIR off
WORKDIR /greenbone-feed-sync

RUN apt-get update && \
apt-get install --no-install-recommends --no-install-suggests -y \
gosu \
rsync \
python3 \
python3-pip && \
apt-get remove --purge --auto-remove -y && \
rm -rf /var/lib/apt/lists/*
apt-get install --no-install-recommends --no-install-suggests -y \
gosu \
rsync \
python3 \
pipx \
python3-pip && \
apt-get remove --purge --auto-remove -y && \
rm -rf /var/lib/apt/lists/*

RUN pipx ensurepath

RUN addgroup --gid 1001 --system gvm && \
adduser --no-create-home --shell /bin/false --disabled-password --uid 1001 --system --group gvm
adduser --no-create-home --shell /bin/false --disabled-password --uid 1001 --system --group gvm

COPY --from=builder /source/dist/* /greenbone-feed-sync/
COPY .docker/entrypoint.sh /usr/local/bin/entrypoint

RUN python3 -m pip install --break-system-packages /greenbone-feed-sync/*

RUN chown -R gvm:gvm /greenbone-feed-sync && \
chmod 755 /usr/local/bin/entrypoint
chmod 755 /usr/local/bin/entrypoint

ENTRYPOINT [ "/usr/local/bin/entrypoint" ]

Expand Down

0 comments on commit ed504cd

Please sign in to comment.