Skip to content

Commit

Permalink
Merge pull request #265 from adelton/patch-1
Browse files Browse the repository at this point in the history
Allow the `apt-get` steps to be cached when rebuilding with different `octoprint_ref` build argument.
  • Loading branch information
LongLiveCHIEF authored Mar 3, 2024
2 parents bbe5783 + d4658e4 commit 71aea9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions minimal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ ARG PYTHON_BASE_IMAGE=3-slim-buster

FROM python:${PYTHON_BASE_IMAGE} AS build

ARG octoprint_ref
ENV octoprint_ref ${octoprint_ref:-master}

RUN apt-get update && apt-get install -y \
build-essential \
curl \
Expand All @@ -26,6 +23,9 @@ ENV PYTHONUSERBASE /octoprint/plugins
ENV PIP_USER true
ENV PATH "${PYTHONUSERBASE}/bin:${PATH}"

ARG octoprint_ref
ENV octoprint_ref ${octoprint_ref:-master}

RUN mkdir tmp && curl -fsSLO --compressed --retry 3 --retry-delay 10 \
https://github.com/OctoPrint/OctoPrint/archive/${octoprint_ref}.tar.gz \
&& tar xzf ${octoprint_ref}.tar.gz --strip-components 1 -C tmp \
Expand Down

0 comments on commit 71aea9d

Please sign in to comment.