feat: add support for custom klipper repo urls (#27)

This commit is contained in:
Stefan Dej 2024-06-11 07:49:16 +02:00 committed by GitHub
parent 93dfb835f0
commit 97096dc45c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 2 deletions

1
.env.example Normal file
View File

@ -0,0 +1 @@
KLIPPER_REPO=https://github.com/Klipper3d/klipper.git

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
.idea .idea
/printer_data* .env
/printer_data*

View File

@ -26,7 +26,9 @@ WORKDIR /build
### Prepare our applications ### Prepare our applications
#### Klipper #### 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 \ && virtualenv -p python3 /build/klippy-env \
&& /build/klippy-env/bin/pip install -r /build/klipper/scripts/klippy-requirements.txt && /build/klippy-env/bin/pip install -r /build/klipper/scripts/klippy-requirements.txt

View File

@ -5,6 +5,8 @@ services:
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
args:
KLIPPER_REPO: ${KLIPPER_REPO:-https://github.com/Klipper3d/klipper.git}
volumes: volumes:
- ./printer_data:/home/printer/printer_data:delegated - ./printer_data:/home/printer/printer_data:delegated
ports: ports: