Skip to content

Commit

Permalink
Allow the apt-get steps to be cached when rebuilding with different…
Browse files Browse the repository at this point in the history
… `octoprint_ref` build argument.
  • Loading branch information
adelton committed Dec 27, 2023
1 parent bbe5783 commit d4658e4
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 d4658e4

Please sign in to comment.