diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..9ccabac --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +KLIPPER_REPO=https://github.com/Klipper3d/klipper.git diff --git a/.gitignore b/.gitignore index 596f591..87c8ef0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea -/printer_data* +.env +/printer_data* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 47bc96d..5bf3513 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,9 @@ WORKDIR /build ### Prepare our applications #### Klipper -RUN git clone https://github.com/klipper3d/klipper \ +ARG KLIPPER_REPO +ENV KLIPPER_REPO=${KLIPPER_REPO} +RUN git clone ${KLIPPER_REPO} klipper \ && virtualenv -p python3 /build/klippy-env \ && /build/klippy-env/bin/pip install -r /build/klipper/scripts/klippy-requirements.txt diff --git a/docker-compose.yml b/docker-compose.yml index be194e2..dee78e1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,8 @@ services: build: context: . dockerfile: Dockerfile + args: + KLIPPER_REPO: ${KLIPPER_REPO:-https://github.com/Klipper3d/klipper.git} volumes: - ./printer_data:/home/printer/printer_data:delegated ports: