Initial commit
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
.idea
|
||||||
|
.vscode
|
35
.woodpecker/build.yaml
Normal file
35
.woodpecker/build.yaml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
matrix:
|
||||||
|
platform:
|
||||||
|
- linux/amd64
|
||||||
|
- linux/arm64
|
||||||
|
|
||||||
|
labels:
|
||||||
|
platform: ${platform}
|
||||||
|
|
||||||
|
when:
|
||||||
|
branch: main
|
||||||
|
event: [push, pull_request, tag]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
test-build:
|
||||||
|
image: docker:27-dind
|
||||||
|
commands:
|
||||||
|
- docker buildx build -t source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-${platform##linux/} .
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
when:
|
||||||
|
event: pull_request
|
||||||
|
|
||||||
|
build-to-registry:
|
||||||
|
image: docker:27-dind
|
||||||
|
environment:
|
||||||
|
CI_USER_PASSWORD:
|
||||||
|
from_secret: registry_token
|
||||||
|
commands:
|
||||||
|
- docker login -u ${CI_REPO_OWNER} -p $${CI_USER_PASSWORD} source.hodakov.me
|
||||||
|
- docker buildx build -t source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-${platform##linux/} .
|
||||||
|
- docker push source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-${platform##linux/}
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
when:
|
||||||
|
event: [push, tag]
|
46
.woodpecker/tag.yaml
Normal file
46
.woodpecker/tag.yaml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
when:
|
||||||
|
branch: main
|
||||||
|
event: [push, tag]
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- build
|
||||||
|
|
||||||
|
steps:
|
||||||
|
tag latest:
|
||||||
|
image: docker:27-dind
|
||||||
|
environment:
|
||||||
|
CI_USER_PASSWORD:
|
||||||
|
from_secret: registry_token
|
||||||
|
commands:
|
||||||
|
- docker login -u ${CI_REPO_OWNER} -p $${CI_USER_PASSWORD} source.hodakov.me
|
||||||
|
- docker pull source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-amd64
|
||||||
|
- docker pull source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-arm64
|
||||||
|
- docker manifest create source.hodakov.me/containers/neko:latest source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-amd64 source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-arm64
|
||||||
|
- docker manifest push source.hodakov.me/containers/neko:latest
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
when:
|
||||||
|
event: push
|
||||||
|
|
||||||
|
tag semver:
|
||||||
|
image: docker:27-dind
|
||||||
|
environment:
|
||||||
|
CI_USER_PASSWORD:
|
||||||
|
from_secret: registry_token
|
||||||
|
commands:
|
||||||
|
- set -eu
|
||||||
|
- docker login -u ${CI_REPO_OWNER} -p $${CI_USER_PASSWORD} source.hodakov.me
|
||||||
|
- source ./scripts/semver.sh
|
||||||
|
- echo "Creating manifest for $${DOCKER_EXACT_TAG}, $${DOCKER_MAJOR_TAG} and $${DOCKER_MINOR_TAG}"
|
||||||
|
- docker pull source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-amd64
|
||||||
|
- docker pull source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-arm64
|
||||||
|
- docker manifest create source.hodakov.me/containers/neko:$${DOCKER_EXACT_TAG} source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-amd64 source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-arm64
|
||||||
|
- docker manifest create source.hodakov.me/containers/neko:$${DOCKER_MINOR_TAG} source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-amd64 source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-arm64
|
||||||
|
- docker manifest create source.hodakov.me/containers/neko:$${DOCKER_MAJOR_TAG} source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-amd64 source.hodakov.me/containers/neko:${CI_COMMIT_SHA:0:10}-arm64
|
||||||
|
- docker manifest push source.hodakov.me/containers/neko:$${DOCKER_EXACT_TAG}
|
||||||
|
- docker manifest push source.hodakov.me/containers/neko:$${DOCKER_MINOR_TAG}
|
||||||
|
- docker manifest push source.hodakov.me/containers/neko:$${DOCKER_MAJOR_TAG}
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
when:
|
||||||
|
event: tag
|
43
Dockerfile
Normal file
43
Dockerfile
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
FROM ghcr.io/m1k1o/neko/base:3.0.8
|
||||||
|
|
||||||
|
# copy sources list file
|
||||||
|
COPY sources.list /etc/apt/sources.list
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# update the system
|
||||||
|
RUN set -eux; \
|
||||||
|
apt-get update; \
|
||||||
|
apt-get -y upgrade;
|
||||||
|
|
||||||
|
# install xfce
|
||||||
|
RUN set -eux; \
|
||||||
|
apt-get install -y --no-install-recommends -o Dpkg::Options::="--force-confnew" xfce4 xfce4-terminal sudo vim curl
|
||||||
|
|
||||||
|
# install brave
|
||||||
|
RUN set -eux; \
|
||||||
|
curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg \
|
||||||
|
https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg; \
|
||||||
|
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main" | \
|
||||||
|
tee /etc/apt/sources.list.d/brave-browser-release.list; \
|
||||||
|
apt update && apt install -y brave-browser
|
||||||
|
|
||||||
|
# install transmission and VLC
|
||||||
|
RUN set -eux; \
|
||||||
|
apt-get update; \
|
||||||
|
apt-get install -y transmission-gtk vlc
|
||||||
|
|
||||||
|
# add user to sudoers
|
||||||
|
RUN set -eux; \
|
||||||
|
usermod -aG sudo neko; \
|
||||||
|
echo "neko:neko" | chpasswd; \
|
||||||
|
echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||||
|
|
||||||
|
# clean up
|
||||||
|
RUN set -eux; \
|
||||||
|
apt-get clean -y; \
|
||||||
|
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
||||||
|
|
||||||
|
# copy configuation files
|
||||||
|
COPY supervisord.conf /etc/neko/supervisord/xfce.conf
|
||||||
|
|
||||||
|
VOLUME /home/neko
|
4
sources.list
Normal file
4
sources.list
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
|
||||||
|
deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
|
||||||
|
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
|
||||||
|
deb http://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware
|
11
supervisord.conf
Normal file
11
supervisord.conf
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[program:xfce]
|
||||||
|
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
|
||||||
|
command=/usr/bin/startxfce4
|
||||||
|
stopsignal=INT
|
||||||
|
autorestart=true
|
||||||
|
priority=500
|
||||||
|
user=%(ENV_USER)s
|
||||||
|
stdout_logfile=/var/log/neko/xfce.log
|
||||||
|
stdout_logfile_maxbytes=100MB
|
||||||
|
stdout_logfile_backups=10
|
||||||
|
redirect_stderr=true
|
Reference in New Issue
Block a user