(wip) nas container

This commit is contained in:
Matthew Tran
2025-02-20 03:00:55 -08:00
parent e7b4e8aa46
commit 077178cbe0
8 changed files with 74 additions and 13 deletions
+16
View File
@@ -0,0 +1,16 @@
FROM ubuntu:24.04
ENV TZ=America/Los_Angeles
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y samba
RUN groupadd -g 2003 me && useradd -u 2003 -g 2003 -m me
USER me
WORKDIR /home/me
# TODO copy config files
RUN mkdir share samba samba/log samba/lock samba/state samba/cache samba/pid samba/private samba/ncalrpc
COPY --chown=me:me smb.conf ./
COPY --chown=me:me entry.sh ./
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
# TODO sigterm?
smbd -s smb.conf -l=/home/me/samba/log --foreground --no-process-group
+24
View File
@@ -0,0 +1,24 @@
[global]
workgroup = WORKGROUP
min protocol = SMB3
smb ports = 8445
lock directory = /home/me/samba/lock
state directory = /home/me/samba/state
cache directory = /home/me/samba/cache
pid directory = /home/me/samba/pid
private dir = /home/me/samba/private
ncalrpc dir = /home/me/samba/ncalrpc
browseable = yes
writable = yes
create mask = 0660
directory mask = 0770
force user = me
force group = me
# TODO auth + encrypt
guest ok = yes
[share]
path = /home/me/share