Skip to content

Commit

Permalink
move dockerfile to repository root and add playbooks directory to doc…
Browse files Browse the repository at this point in the history
…ker image
  • Loading branch information
aantn committed Aug 31, 2021
1 parent 69579ba commit 7c3d6eb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions src/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@ RUN apt-get update \
# disabled because of an issue with the libreadline7 dependency
#RUN wget https://launchpad.net/~ionel-mc/+archive/ubuntu/socat/+build/15532886/+files/socat_1.7.3.2-2ubuntu2ionelmc2~ppa1_amd64.deb
#RUN dpkg -i socat_1.7.3.2-2ubuntu2ionelmc2~ppa1_amd64.deb

ENV CUSTOM_PLAYBOOKS_ROOT=/etc/robusta/config
ENV ENV_TYPE=DEV

# we install the project requirements and install the app in separate stages to optimize docker layer caching
RUN mkdir /app
RUN pip3 install --upgrade pip
RUN pip3 install poetry==1.1.6
RUN poetry config virtualenvs.create false
COPY pyproject.toml /app
COPY poetry.lock /app
COPY src/pyproject.toml /app
COPY src/poetry.lock /app
WORKDIR /app
RUN bash -c "pip3 install --requirement <(poetry export --dev --format requirements.txt --without-hashes)"

COPY . /app
ADD src/ /app

RUN pip3 install --use-feature=in-tree-build .

COPY playbooks/ /etc/robusta/playbooks/defaults
RUN pip3 install -r /etc/robusta/playbooks/defaults/requirements.txt
# remove the requirements so that we don't reinstall them at runtime
RUN rm /etc/robusta/playbooks/defaults/requirements.txt
# -u disables stdout buffering https://stackoverflow.com/questions/107705/disable-output-buffering
CMD [ "python3", "-u", "-m", "robusta.runner.main"]
File renamed without changes.
4 changes: 2 additions & 2 deletions skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
build:
artifacts:
- image: us-central1-docker.pkg.dev/genuine-flight-317411/devel/robusta-runner
context: src
context: .
docker:
dockerfile: Dockerfile
local:
Expand All @@ -32,7 +32,7 @@ profiles:
build:
artifacts:
- image: us-central1-docker.pkg.dev/genuine-flight-317411/devel/robusta-runner
context: src
context: .
custom:
buildCommand: ./build_on_apple_m1.sh
local:
Expand Down

0 comments on commit 7c3d6eb

Please sign in to comment.