-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
70 lines (64 loc) · 2.88 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Secure and Minimal image of Samba Share
# https://hub.docker.com/repository/docker/huggla/sam-samba
# =========================================================================
# Init
# =========================================================================
# ARGs (can be passed to Build/Final) <BEGIN>
ARG SaM_VERSION="2.0.6-3.16"
ARG IMAGETYPE="application"
ARG RUNDEPS="samba-server samba-common-tools libsmbclient"
ARG MAKEFILES="/var/lib/samba/private/secrets.tdb"
ARG MAKEDIRS="/run/samba"
ARG STARTUPEXECUTABLES="/usr/bin/smbpasswd /usr/sbin/nmbd /usr/sbin/smbd"
ARG REMOVEFILES="/etc/samba/*"
ARG GID0WRITABLES="/run/samba"
# ARGs (can be passed to Build/Final) </END>
# Generic template (don't edit) <BEGIN>
FROM ${CONTENTIMAGE1:-scratch} as content1
FROM ${CONTENTIMAGE2:-scratch} as content2
FROM ${CONTENTIMAGE3:-scratch} as content3
FROM ${CONTENTIMAGE4:-scratch} as content4
FROM ${CONTENTIMAGE5:-scratch} as content5
FROM ${BASEIMAGE:-huggla/secure_and_minimal:$SaM_VERSION-base} as base
FROM ${INITIMAGE:-scratch} as init
# Generic template (don't edit) </END>
# =========================================================================
# Build
# =========================================================================
# Generic template (don't edit) <BEGIN>
FROM ${BUILDIMAGE:-huggla/secure_and_minimal:$SaM_VERSION-build} as build
FROM ${BASEIMAGE:-huggla/secure_and_minimal:$SaM_VERSION-base} as final
COPY --from=build /finalfs /
# Generic template (don't edit) </END>
# =========================================================================
# Final
# =========================================================================
ARG CONFIG_DIR="/etc/samba"
ENV VAR_LINUX_USER="samba" \
VAR_INIT_CAPS="cap_chown" \
VAR_CONFIG_FILE="$CONFIG_DIR/smb.conf" \
VAR_DEBUGLEVEL="1" \
VAR_SHARES_DIR="/shares" \
VAR_SHARE_USERS="shareuser" \
VAR_NMBD_PORT="4450" \
VAR_SMBD_PORTS="4450" \
VAR_FINAL_COMMAND="nmbd --daemon -p \$VAR_NMBD_PORT --debuglevel=\$VAR_DEBUGLEVEL --configfile=\$VAR_CONFIG_FILE --no-process-group && smbd -p \$VAR_SMBD_PORTS --foreground --debug-stdout --debuglevel=\$VAR_DEBUGLEVEL --configfile=\$VAR_CONFIG_FILE --no-process-group" \
VAR_global_smb_passwd_file="$CONFIG_DIR/smbpasswd" \
VAR_global_dns_proxy="no" \
VAR_global_username_map="$CONFIG_DIR/usermap.txt" \
VAR_global_log_file="/var/log/samba/log.%m" \
VAR_global_max_log_size="0" \
VAR_global_panic_action="killall nmbd smbd" \
VAR_global_server_role="standalone" \
VAR_global_map_to_guest="bad user" \
VAR_global_load_printers="no" \
VAR_global_printing="bsd" \
VAR_global_printcap_name="/dev/null" \
VAR_global_disable_spoolss="yes" \
VAR_global_disable_netbios="yes" \
VAR_global_smb_encrypt="desired" \
VAR_global_lanman_auth="no"
# Generic template (don't edit) <BEGIN>
USER starter
ONBUILD USER root
# Generic template (don't edit) </END>