-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
858b2ec
commit 7760604
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM alpine:3.15.5 | ||
|
||
RUN apk add --no-cache samba-server | ||
|
||
COPY start.sh /start.sh | ||
|
||
EXPOSE 137/udp | ||
|
||
CMD ["/start.sh"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# nmbd | ||
|
||
Run Samba's NMBD inside docker to respond to NETBIOS queries | ||
|
||
## Usage | ||
|
||
Run the container: | ||
|
||
```bash | ||
docker run -it --rm -p 137:137/udp \ | ||
-e NETBIOS_NAME=MYHOSTNAME \ | ||
-e NETBIOS_WORKGROUP=MYWORKGROUP \ | ||
markdegroot/nmbd | ||
``` | ||
The following optional parameters can be configured using environment variables: | ||
- NETBIOS_NAME | ||
- NETBIOS_WORKGROUP | ||
|
||
## Building | ||
|
||
Build the container using: | ||
```bash | ||
docker build -t markdegroot/nmbd . | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
/usr/sbin/nmbd -i \ | ||
"--option=netbios name = ${NETBIOS_NAME:-$HOSTNAME}" \ | ||
"--option=workgroup = ${NETBIOS_WORKGROUP:-WORKGROUP}" \ | ||
"--option=local master = no" |