From efb16f37bd9e0df6bdf4043d80ec73e9d4b7056b Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Thu, 26 Feb 2026 18:08:57 +0100 Subject: [PATCH] change base image of os to alpine-xfce make sure we have required packages to run go apps add maketile commands for building and running os --- Makefile | 21 ++++++++++++++++----- build/Dockerfile | 4 +++- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index e18a7f0..07fa109 100644 --- a/Makefile +++ b/Makefile @@ -12,10 +12,11 @@ clean: @rm package.json build: tidy - go build -o ./bin/pm ./cmd/pm - go build -o ./bin/tui ./cmd/tui - go build -o ./bin/web ./cmd/web - go build -o ./bin/survey ./cmd/survey + @go build -o ./bin/pm ./cmd/pm + @go build -o ./bin/tui ./cmd/tui + @go build -o ./bin/web ./cmd/web + @go build -o ./bin/survey ./cmd/survey + @echo "Build completed successfully. Binaries are located in the ./bin directory." enable-multiplatform-build: @docker buildx create --name multiplatform --use 2>/dev/null || docker buildx use multiplatform @@ -33,9 +34,19 @@ docker-run: docker-push: @docker push telikz/lazypm:latest -build-os: build +os-build: build @cp ./bin/survey ./build/survey @docker build -t lazyos ./build + @echo "Built lazyos image successfully. You can run it using 'make os-run'." + +os-run: os-build + @docker run -d --name=lazyos -e PUID=1000 -e PGID=1000 -e TZ=Etc/UTC -p 3000:3000 -p 3001:3001 --shm-size="1gb" lazyos:latest + @echo "Started lazyos container successfully. You can access the web interface at http://localhost:3000." + +os-stop: + @docker stop lazyos + @docker rm lazyos + @echo "Stopped and removed lazyos container successfully." start: @go run ./cmd/survey start diff --git a/build/Dockerfile b/build/Dockerfile index bddcbcc..9184e80 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,6 @@ -FROM lscr.io/linuxserver/webtop:arch-kde +FROM lscr.io/linuxserver/webtop:latest + +RUN apk add --no-cache gcompat libc6-compat COPY survey /usr/local/bin/survey RUN chmod +x /usr/local/bin/survey