From 9e405abf2b09f79bf4c711b16095fed8f5322e53 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Fri, 17 Jan 2025 19:18:25 +0100 Subject: [PATCH] initial commit Signed-off-by: Simon L. --- .github/workflows/docker-build.yml | 2 +- Dockerfile | 50 ++++++++++++++++-------------- README.md | 2 +- startapp.sh | 13 ++------ 4 files changed, 31 insertions(+), 36 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 4dd2295..a9bf7e2 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -38,5 +38,5 @@ jobs: context: './' no-cache: true file: 'Dockerfile' - tags: szaimen/aio-borgbackup-viewer:${{ github.event.inputs.tagName }} + tags: szaimen/aio-smbserver:${{ github.event.inputs.tagName }} provenance: false diff --git a/Dockerfile b/Dockerfile index 23df21c..e24a4ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,12 @@ -FROM jlesage/baseimage-gui:alpine-3.21-v4 +FROM jlesage/baseimage-gui:ubuntu-24.04-v4 COPY --chmod=775 startapp.sh /startapp.sh +ADD https://raw.githubusercontent.com/nextcloud/vm/refs/heads/main/static/fetch_lib.sh /var/scripts/fetch_lib.sh +ADD https://raw.githubusercontent.com/nextcloud/vm/main/lib.sh /var/scripts/lib.sh +ADD https://raw.githubusercontent.com/nextcloud/vm/refs/heads/main/not-supported/smbserver.sh /smbserver.sh # Set the name of the application. -RUN set-cont-env APP_NAME "Nextcloud AIO Borg Backup Viewer" +RUN set-cont-env APP_NAME "Nextcloud AIO SMB Server" # hadolint ignore=DL3002 USER root @@ -13,28 +16,29 @@ ENV USER_ID=0 \ WEB_AUDIO=1 \ WEB_AUTHENTICATION=1 \ SECURE_CONNECTION=1 \ - HOME=/root + WEB_LISTENING_PORT=5600 -# hadolint ignore=DL3018 +# hadolint ignore=DL3008 RUN set -ex; \ \ - apk upgrade --no-cache -a; \ - apk add --no-cache \ - util-linux-misc \ - bash \ - borgbackup \ - rsync \ - fuse \ - py3-llfuse \ - alpine-conf \ - nautilus \ + apt-get update; \ + apt-get upgrade -y; \ + apt-get install -y --no-install-recommends \ + whiptail \ + samba \ + cpuid \ + curl \ xterm \ - eog \ - gedit \ - vlc \ - font-terminus font-inconsolata font-dejavu font-noto font-noto-cjk font-awesome font-noto-extra font-liberation; \ - setup-desktop gnome; \ - rc-update add apk-polkit-server default -# TODO: add further dependencies like e.g. grsync onlyoffice-desktopeditors -# https://gitlab.alpinelinux.org/alpine/aports/-/issues/16847 -# https://gitlab.alpinelinux.org/alpine/aports/-/issues/14535 + lsb-release \ + iproute2 \ + adduser \ + ; \ + rm -rf /var/lib/apt/lists/*; \ +# rm /etc/cont-init.d/10-init-users.sh; \ # This script tries to delete the /etc/shadow and /etc/group files + chmod +x /startapp.sh + +VOLUME /etc/samba +# VOLUME /etc/group # is a file +# /etc/shadow auch reinmounten, beides read-write. +# Crontabs are need to be stored as well? + diff --git a/README.md b/README.md index 0403e8b..caddbf2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # aio-borgbackup-viewer -Borg backup viewer container used in https://github.com/nextcloud/all-in-one/tree/main/community-containers/borgbackup-viewer +Borg backup viewer container used in https://github.com/nextcloud/all-in-one/tree/main/community-containers/smbserver diff --git a/startapp.sh b/startapp.sh index 2706c1f..d1435fa 100644 --- a/startapp.sh +++ b/startapp.sh @@ -1,15 +1,6 @@ #!/bin/bash -mkdir -p /tmp/borg +groupadd -g 33 www-data +adduser --no-create-home --quiet --uid 33 --gid 33 --disabled-login --force-badname --gecos www-data www-data -clean_up_backup() { - set -x - umount /tmp/borg -} - -# Catch docker stop attempts -trap clean_up_backup SIGINT SIGTERM - -# Start xterm -xhost +si:localuser:root exec xterm