Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial commit #2

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
50 changes: 27 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also need to modify the script to allow normal directories, not only mountpoints: https://github.com/nextcloud/vm/blob/b98a75bd503427366a566db699c09474196c7813/not-supported/smbserver.sh#L56-L60

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also systemctl is not supported...

# 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
Expand All @@ -13,28 +16,29 @@ ENV USER_ID=0 \
WEB_AUDIO=1 \
WEB_AUTHENTICATION=1 \
SECURE_CONNECTION=1 \
HOME=/root
WEB_LISTENING_PORT=5600

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe adjust to 5802

# 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
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be handled...


VOLUME /etc/samba
# VOLUME /etc/group # is a file
# /etc/shadow auch reinmounten, beides read-write.
# Crontabs are need to be stored as well?

Comment on lines +40 to +43
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like these

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
13 changes: 2 additions & 11 deletions startapp.sh
Original file line number Diff line number Diff line change
@@ -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
Comment on lines +3 to +4
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also copy the /etc/group and /etc/shadow files to a volume after the initial creation and then always copy it back and also before stopping save it in a volume... Same could be done for other important files


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
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should also start the smb services in the background...

Loading