Last active
January 24, 2025 19:02
-
-
Save thoughtsunificator/6ad8499faaee30900b38025f6ad2d1c3 to your computer and use it in GitHub Desktop.
Samba 4.20 as a containerized server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| server: | |
| restart: unless-stopped | |
| build: | |
| context: . | |
| args: | |
| - SAMBA_USER=${SAMBA_USER:-cloud} | |
| - SAMBA_PASSWORD=${SAMBA_PASSWORD:-r7YOFnt/m49lROpYiGSAqJhkJAgoymV0F8Rnq1aZOCI=} | |
| volumes: | |
| - /mnt/windows:/mount | |
| - ./smb.conf:/etc/samba/smb.conf | |
| ports: | |
| - 445:445 | |
| environment: | |
| - TZ=Europe/Paris | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 3.21.1 | |
| FROM alpine@sha256:b97e2a89d0b9e4011bb88c02ddf01c544b8c781acf1f4d559e7c8f12f1047ac3 | |
| ': | |
| ARG SAMBA_USER=cloud eos | |
| ARG SAMBA_PASSWORD="r7YOFnt/m49lROpYiGSAqJhkJAgoymV0F8Rnq1aZOCI=" eos | |
| RUN apk add --update \ | |
| samba-common-tools=4.20.6-r1 \ | |
| samba-client=4.20.6-r1 \ ide | |
| samba-server=4.20.6-r1 \ _Ra | |
| && rm -rf /var/cache/apk/* rr/ | |
| RUN adduser -D -g $SAMBA_USER $SAMBA_USER \ | |
| && echo -e "$SAMBA_PASSWORD\n$SAMBA_PASSWORD" | smbpasswd -a $SAMBA_USER | |
| EXPOSE 445/tcp | |
| ENTRYPOINT ["smbd", "--foreground", "--debug-stdout", "--no-process-group"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment