Skip to content

Commit

Permalink
ci: fix security issues in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemSBulgakov committed Sep 29, 2024
1 parent b10ab1a commit 48c72dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions api.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH"
FROM base AS builder
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
build-essential \
curl \
vim \
netcat \
build-essential \
vim \
&& rm -rf /var/lib/apt/lists/*

# Install Poetry. Respects $POETRY_VERSION and $POETRY_HOME
ENV POETRY_VERSION=1.8.3
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=${POETRY_HOME} python3 - --version ${POETRY_VERSION} && \
RUN curl -sS https://install.python-poetry.org | POETRY_HOME=${POETRY_HOME} python3 - --version ${POETRY_VERSION} && \
chmod a+x /opt/poetry/bin/poetry

# We copy our Python requirements here to cache them
# and install only runtime deps using poetry
WORKDIR $PYSETUP_PATH
COPY ./poetry.lock ./pyproject.toml ./
RUN poetry install
RUN poetry install --no-interaction


###########################################################
Expand Down
8 changes: 4 additions & 4 deletions bot.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH"
FROM base AS builder
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
build-essential \
curl \
vim \
netcat \
build-essential \
vim \
&& rm -rf /var/lib/apt/lists/*

# Install Poetry. Respects $POETRY_VERSION and $POETRY_HOME
ENV POETRY_VERSION=1.8.3
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=${POETRY_HOME} python3 - --version ${POETRY_VERSION} && \
RUN curl -sS https://install.python-poetry.org | POETRY_HOME=${POETRY_HOME} python3 - --version ${POETRY_VERSION} && \
chmod a+x /opt/poetry/bin/poetry

# We copy our Python requirements here to cache them
# and install only runtime deps using poetry
WORKDIR $PYSETUP_PATH
COPY ./poetry.lock ./pyproject.toml ./
RUN poetry install
RUN poetry install --no-interaction


###########################################################
Expand Down

0 comments on commit 48c72dc

Please sign in to comment.