Skip to content

Commit

Permalink
working version
Browse files Browse the repository at this point in the history
  • Loading branch information
Avi-Robusta committed Jun 9, 2024
1 parent 98a9b1a commit 6799962
Show file tree
Hide file tree
Showing 3 changed files with 762 additions and 820 deletions.
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# see https://pythonspeed.com/articles/alpine-docker-python/ for the reason we don't use alpine
FROM python:3.9-slim
FROM python:3.11-slim
RUN apt-get update \
&& dpkg --add-architecture arm64 \
&& apt-get install -y --no-install-recommends git ssh socat wget curl libcairo2 python3-dev libffi-dev \
&& apt-get install -y --no-install-recommends git ssh curl libcairo2 \
&& pip3 install --no-cache-dir --upgrade pip \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -16,18 +16,20 @@ WORKDIR /app
# Install gcc to compile rumal.yaml.clib, wheel is missing.
RUN apt-get update \
&& apt-get install -y --no-install-recommends gcc \
&& pip3 install --no-cache-dir ruamel.yaml.clib==0.2.8 \
&& apt-get purge -y --auto-remove gcc \
&& rm -rf /var/lib/apt/lists/*
&& pip3 install --no-cache-dir ruamel.yaml.clib==0.2.8

# we install the project requirements and install the app in separate stages to optimize docker layer caching
COPY pyproject.toml poetry.lock /app/
RUN /root/.local/bin/poetry install --no-root --no-dev --extras "all"

RUN /root/.local/bin/poetry install --no-root --only main --extras "all"
COPY src/ /app/src
RUN /root/.local/bin/poetry install --no-dev --extras "all"

COPY playbooks/ /etc/robusta/playbooks/defaults
RUN python3 -m pip install --no-cache-dir /etc/robusta/playbooks/defaults

RUN apt-get purge -y --auto-remove gcc \
&& rm -rf /var/lib/apt/lists/*

# -u disables stdout buffering https://stackoverflow.com/questions/107705/disable-output-buffering
CMD [ "python3", "-u", "-m", "robusta.runner.main"]
Loading

0 comments on commit 6799962

Please sign in to comment.