Skip to content

Commit

Permalink
try ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
Mantouisyummy committed May 6, 2024
1 parent 2cc5525 commit fa5cd74
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,17 @@ FROM python:3.11.5-slim as build
ENV PIP_DEFAULT_TIMEOUT=100 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1 \
POETRY_VERSION=1.3.2
PIP_NO_CACHE_DIR=1

RUN mkdir -p /keyword
WORKDIR /keyword


COPY pyproject.toml poetry.lock ./
RUN pip install "poetry==$POETRY_VERSION" \
&& poetry install --no-root --no-ansi --no-interaction \
&& poetry export -f requirements.txt -o requirements.txt

COPY . ./keyword

FROM python:3.11.5-slim as Final
FROM gcr.io/distroless/python3

WORKDIR /keyword


COPY --from=build /keyword/requirements.txt .

RUN set -ex \
&& addgroup --system --gid 1001 appgroup \
&& adduser --system --uid 1001 --gid 1001 --no-create-home appuser \
Expand All @@ -31,12 +23,6 @@ RUN set -ex \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* \
&& rm requirements.txt \
&& rm -rf /root/.cache/pip/*


COPY .env .env
COPY /guild /guild
COPY . .

CMD [ "python3", "main.py" ]

0 comments on commit fa5cd74

Please sign in to comment.