nas-samba: rebuilt as single Ubuntu image with Samba + CloudNAS (no MongoDB)

This commit is contained in:
2026-03-16 23:22:42 +00:00
parent 0104827234
commit 618e023996
43 changed files with 26653 additions and 107 deletions

View File

@@ -0,0 +1,51 @@
FROM ubuntu:24.04
LABEL maintainer="alexz"
LABEL description="NAS Samba + CloudNAS file manager"
ENV DEBIAN_FRONTEND=noninteractive
# Install runtime: Samba, supervisor, tini, Node.js 20.x, build tools for native modules
RUN apt-get update && \
apt-get install -y --no-install-recommends \
samba \
samba-common-bin \
supervisor \
curl \
ca-certificates \
tini \
python3 \
make \
g++ \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
# Copy app source
COPY app/ /app/
WORKDIR /app
# Install production dependencies (compiles better-sqlite3 native module)
RUN npm ci --omit=dev && npm cache clean --force
# Clean up
RUN rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man
# Create directories
RUN mkdir -p /nas /config /var/log/supervisor /var/log/samba /run/samba
# Samba configuration
COPY smb.conf /etc/samba/smb.conf
# Supervisord configuration
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 8080 139 445
ENTRYPOINT ["tini", "--"]
CMD ["/entrypoint.sh"]