diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..f1b5ee68da --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +.git +.github +.vscode +.devcontainer +*.log +*.tmp +node_modules/ +build_output/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..bd3d2f7911 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM ubuntu:latest + +RUN apt-get update \ + && apt-get install -y --no-install-recommends nodejs npm git ca-certificates python3-pip \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /workdir + +COPY . . + +RUN npm ci +RUN pip install --break-system-packages --ignore-installed -r requirements.txt + +CMD ["bash"] diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000000..2d93071284 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,11 @@ +# Usage: PIO_ENV=esp32dev docker compose up + +services: + wled-build: + image: wled-build + build: . + environment: + - PIO_ENV=${PIO_ENV:-esp32dev} + volumes: + - ./build_output:/workdir/build_output + command: ["bash", "-c", "npm run build && pio run -e $PIO_ENV"]