36 lines
825 B
Docker
36 lines
825 B
Docker
ARG BUILD_FROM
|
|
FROM $BUILD_FROM
|
|
|
|
# Add env
|
|
ENV LANG C.UTF-8
|
|
|
|
# Set S6 wait time
|
|
ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
|
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
|
S6_SERVICES_GRACETIME=0
|
|
|
|
USER root
|
|
|
|
# Setup base
|
|
RUN \
|
|
apk add --no-cache samba \
|
|
&& mkdir -p /var/lib/samba \
|
|
&& touch \
|
|
/etc/samba/lmhosts \
|
|
/var/lib/samba/account_policy.tdb \
|
|
/var/lib/samba/registry.tdb \
|
|
/var/lib/samba/winbindd_idmap.tdb
|
|
|
|
# Copy data
|
|
COPY rootfs /
|
|
|
|
# Modules
|
|
ARG MODULES="00-local_mounts.sh"
|
|
|
|
# Automatic modules download
|
|
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_automodules.sh" "/ha_automodules.sh"
|
|
RUN chmod 744 /ha_automodules.sh && /ha_automodules.sh "$MODULES" && rm /ha_automodules.sh
|
|
|
|
HEALTHCHECK \
|
|
CMD smbclient -L '\\localhost' -U '%' -m SMB3
|