🧑‍💻 Update Docker setup (#27998)

This commit is contained in:
ThomasToka 2025-10-06 21:36:36 +02:00 committed by GitHub
parent bdf8b0703a
commit e43c2752c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 37 additions and 2 deletions

View file

@ -20,7 +20,7 @@ help:
@echo "make unit-test-single-local-docker : Run unit tests for a single config locally, using docker"
@echo "make unit-test-all-local : Run all code tests locally"
@echo "make unit-test-all-local-docker : Run all code tests locally, using docker"
@echo "make setup-local-docker : Setup local docker using buildx"
@echo "make setup-local-docker : Setup local docker"
@echo ""
@echo "Options for testing:"
@echo " TEST_TARGET Set when running tests-single-*, to select the"
@ -88,7 +88,26 @@ unit-test-all-local-docker:
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make unit-test-all-local
USERNAME := $(shell whoami)
USER_ID := $(shell id -u)
GROUP_ID := $(shell id -g)
.PHONY: setup-local-docker setup-local-docker-old
setup-local-docker:
@echo "Building marlin-dev Docker image..."
$(CONTAINER_RT_BIN) build -t $(CONTAINER_IMAGE) \
--build-arg USERNAME=$(USERNAME) \
--build-arg USER_ID=$(USER_ID) \
--build-arg GROUP_ID=$(GROUP_ID) \
-f docker/Dockerfile .
@echo
@echo "To run all tests in Docker:"
@echo " make tests-all-local-docker"
@echo "To run a single test in Docker:"
@echo " make tests-single-local-docker TEST_TARGET=mega2560"
setup-local-docker-old:
$(CONTAINER_RT_BIN) buildx build -t $(CONTAINER_IMAGE) -f docker/Dockerfile .
PINS := $(shell find Marlin/src/pins -mindepth 2 -name '*.h')

View file

@ -1,4 +1,20 @@
FROM python:3.9.0-buster
FROM python:3.11-bookworm
# Install build dependencies for simulator UI
RUN apt-get update && apt-get install -y \
libsdl2-dev \
libsdl2-net-dev \
libgl1-mesa-dev \
libegl1-mesa-dev \
libglu1-mesa-dev \
libx11-dev \
libxext-dev \
libxrandr-dev \
libxinerama-dev \
libxcursor-dev \
libxi-dev \
libglm-dev \
&& rm -rf /var/lib/apt/lists/*
# Disable warnings about not having a TTY
ARG DEBIAN_FRONTEND=noninteractive