move docker & xorg-deps to utils.

This commit is contained in:
Miroslav Šedivý 2025-03-31 10:28:07 +02:00
parent 9e9cd6f486
commit 3de71dc038
48 changed files with 11 additions and 11 deletions

View file

@ -43,7 +43,7 @@ jobs:
password: ${{ secrets.DOCKER_TOKEN }}
- name: Generate base Dockerfile
run: go run docker/main.go -i Dockerfile.tmpl -o Dockerfile
run: go run utils/docker/main.go -i Dockerfile.tmpl -o Dockerfile
- name: Build and push
uses: docker/build-push-action@v6

View file

@ -70,7 +70,7 @@ jobs:
- name: Generate base Dockerfile
env:
RUNTIME_DOCKERFILE: ${{ inputs.dockerfile || 'Dockerfile' }}
run: go run docker/main.go -i Dockerfile.tmpl -o Dockerfile -client client/dist
run: go run utils/docker/main.go -i Dockerfile.tmpl -o Dockerfile -client client/dist
- name: Build and push
uses: docker/build-push-action@v6

View file

@ -1,14 +1,14 @@
# This Dockerfile is pre-processed by the ./docker script, it is not meant to be used directly.
# This Dockerfile is pre-processed by the ./utils/docker script, it is not meant to be used directly.
FROM ./runtime/xorg-deps/ AS xorg-deps
FROM ./server/ AS server
FROM ./client/ AS client
FROM ./utils/xorg-deps/ AS xorg-deps
FROM ./runtime/$RUNTIME_DOCKERFILE AS runtime
COPY --from=xorg-deps /usr/local/lib/xorg/modules/drivers/dummy_drv.so /usr/lib/xorg/modules/drivers/dummy_drv.so
COPY --from=xorg-deps /usr/local/lib/xorg/modules/input/neko_drv.so /usr/lib/xorg/modules/input/neko_drv.so
COPY --from=server /src/bin/plugins/ /etc/neko/plugins/
COPY --from=server /src/bin/neko /usr/bin/neko
COPY --from=client /src/dist/ /var/www
COPY --from=xorg-deps /usr/local/lib/xorg/modules/drivers/dummy_drv.so /usr/lib/xorg/modules/drivers/dummy_drv.so
COPY --from=xorg-deps /usr/local/lib/xorg/modules/input/neko_drv.so /usr/lib/xorg/modules/input/neko_drv.so
COPY config.yml /etc/neko/neko.yaml

2
build
View file

@ -318,5 +318,5 @@ docker run --rm -i \
--workdir /src \
--entrypoint go \
golang:1.24-bullseye \
run ./docker/main.go \
run utils/docker/main.go \
-i Dockerfile.tmpl -client "$CLIENT_DIST" | build_image $BASE_IMAGE -f - .

View file

@ -1,3 +0,0 @@
module github.com/m1k1o/neko/docker
go 1.24.1

View file

@ -1,6 +1,6 @@
#!/bin/bash
cd "$(dirname "$0")"
cd ../../runtime/xorg-deps/xf86-input-neko
cd ../../utils/xorg-deps/xf86-input-neko
#
# aborting if any command returns a non-zero value

3
utils/docker/go.mod Normal file
View file

@ -0,0 +1,3 @@
module github.com/m1k1o/neko/utils/docker
go 1.24.1