-
Notifications
You must be signed in to change notification settings - Fork 35
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
Showing
8 changed files
with
134 additions
and
118 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,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
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 @@ | ||
builds/** |
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 |
---|---|---|
|
@@ -18,10 +18,10 @@ LABEL mantainer="Eloy Lopez <[email protected]>" \ | |
RUN apk update && apk upgrade && apk add bash samba-common-tools samba && rm -rf /var/cache/apk/* | ||
|
||
COPY template.conf / | ||
COPY entrypoint.sh / | ||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod u+x /entrypoint.sh | ||
|
||
EXPOSE 445 137 138 139 | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["-h"] | ||
CMD ["-h"] |
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 DeftWork | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
MIT License | ||
Copyright (c) 2020 DeftWork | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 |
---|---|---|
@@ -1,52 +1,65 @@ | ||
SNAME ?= samba | ||
NAME ?= elswork/$(SNAME) | ||
VER ?= `cat VERSION` | ||
BASE ?= latest | ||
BASENAME ?= alpine:$(BASE) | ||
ARCH2 ?= armv7l | ||
ARCH3 ?= aarch64 | ||
GOARCH := $(shell uname -m) | ||
ifeq ($(GOARCH),x86_64) | ||
GOARCH := amd64 | ||
endif | ||
|
||
# HELP | ||
# This will output the help for each task | ||
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html | ||
.PHONY: help | ||
|
||
help: ## This help. | ||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | ||
|
||
.DEFAULT_GOAL := help | ||
|
||
# DOCKER TASKS | ||
# Build the container | ||
|
||
debug: ## Build the container | ||
docker build -t $(NAME):$(GOARCH) \ | ||
--build-arg BASEIMAGE=$(BASENAME) \ | ||
--build-arg VERSION=$(GOARCH)_$(VER) . | ||
build: ## Build the container | ||
docker build --no-cache -t $(NAME):$(GOARCH) \ | ||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ | ||
--build-arg VCS_REF=`git rev-parse --short HEAD` \ | ||
--build-arg BASEIMAGE=$(BASENAME) \ | ||
--build-arg VERSION=$(GOARCH)_$(VER) \ | ||
. > ../builds/$(SNAME)_$(GOARCH)_$(VER)_`date +"%Y%m%d_%H%M%S"`.txt | ||
tag: ## Tag the container | ||
docker tag $(NAME):$(GOARCH) $(NAME):$(GOARCH)_$(VER) | ||
push: ## Push the container | ||
docker push $(NAME):$(GOARCH)_$(VER) | ||
docker push $(NAME):$(GOARCH) | ||
deploy: build tag push | ||
manifest: ## Create an push manifest | ||
docker manifest create $(NAME):$(VER) \ | ||
$(NAME):$(GOARCH)_$(VER) \ | ||
$(NAME):$(ARCH2)_$(VER) \ | ||
$(NAME):$(ARCH3)_$(VER) | ||
docker manifest push --purge $(NAME):$(VER) | ||
docker manifest create $(NAME):latest $(NAME):$(GOARCH) \ | ||
$(NAME):$(ARCH2) \ | ||
$(NAME):$(ARCH3) | ||
docker manifest push --purge $(NAME):latest | ||
SNAME ?= samba | ||
RNAME ?= elswork/$(SNAME) | ||
VER ?= `cat VERSION` | ||
BASE ?= latest | ||
BASENAME ?= alpine:$(BASE) | ||
ARCH2 ?= armv7l | ||
ARCH3 ?= aarch64 | ||
GOARCH := $(shell uname -m) | ||
ifeq ($(GOARCH),x86_64) | ||
GOARCH := amd64 | ||
endif | ||
|
||
# HELP | ||
# This will output the help for each task | ||
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html | ||
.PHONY: help | ||
|
||
help: ## This help. | ||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | ||
|
||
.DEFAULT_GOAL := help | ||
|
||
# DOCKER TASKS | ||
|
||
debug: ## Debug the container | ||
docker build -t $(RNAME):$(GOARCH) \ | ||
--build-arg BASEIMAGE=$(BASENAME) \ | ||
--build-arg VERSION=$(GOARCH)_$(VER) . | ||
build: ## Build the container | ||
docker build --no-cache -t $(RNAME):$(GOARCH) \ | ||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ | ||
--build-arg VCS_REF=`git rev-parse --short HEAD` \ | ||
--build-arg BASEIMAGE=$(BASENAME) \ | ||
--build-arg VERSION=$(GOARCH)_$(VER) \ | ||
. > builds/$(GOARCH)_$(VER)_`date +"%Y%m%d_%H%M%S"`.txt | ||
bootstrap: ## Start multicompiler | ||
docker buildx inspect --bootstrap | ||
buildx: ## Buildx the container | ||
docker buildx build \ | ||
--platform linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 \ | ||
-t $(RNAME):latest -t $(RNAME):$(VER) --push \ | ||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ | ||
--build-arg VCS_REF=`git rev-parse --short HEAD` \ | ||
--build-arg BASEIMAGE=$(BASENAME) \ | ||
--build-arg VERSION=$(VER) . | ||
tag: ## Tag the container | ||
docker tag $(RNAME):$(GOARCH) $(RNAME):$(GOARCH)_$(VER) | ||
push: ## Push the container | ||
docker push $(RNAME):$(GOARCH)_$(VER) | ||
docker push $(RNAME):$(GOARCH) | ||
deploy: build tag push | ||
manifest: ## Create an push manifest | ||
docker manifest create $(RNAME):$(VER) \ | ||
$(RNAME):$(GOARCH)_$(VER) \ | ||
$(RNAME):$(ARCH2)_$(VER) \ | ||
$(RNAME):$(ARCH3)_$(VER) | ||
docker manifest push --purge $(RNAME):$(VER) | ||
docker manifest create $(RNAME):latest $(RNAME):$(GOARCH) \ | ||
$(RNAME):$(ARCH2) \ | ||
$(RNAME):$(ARCH3) | ||
docker manifest push --purge $(RNAME):latest | ||
start: ## Start samba | ||
docker run -d -p 137:137/udp -p 138:138/udp -p 139:139 -p 445:445 -p 445:445/udp \ | ||
--hostname 'filer' --restart='unless-stopped' -v /mnt/store/smb:/share/folder \ | ||
elswork/samba:latest -u "pirate:PASSWORD" -s "OdroidHC1:/share/folder:rw:pirate" |
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 |
---|---|---|
@@ -1,41 +1,41 @@ | ||
# Samba | ||
|
||
A [Docker](http://docker.com) file to build images for AMD & ARM devices with a installation of [Samba](https://www.samba.org/) that is the standard Windows interoperability suite of programs for Linux and Unix. This is my personal Multi-architecture docker recipe. | ||
|
||
> Be aware! You should read carefully the usage documentation of every tool! | ||
## Thanks to | ||
|
||
- [Samba](https://www.samba.org/) | ||
- [dastrasmue rpi-samba](https://github.com/dastrasmue/rpi-samba) | ||
|
||
## Details | ||
|
||
- [GitHub](https://github.com/DeftWork/samba) | ||
- [Deft.Work my personal blog](http://deft.work/Samba) | ||
|
||
| Docker Hub | Docker Pulls | Docker Stars | Size/Layers | | ||
| --- | --- | --- | --- | | ||
| [samba](https://hub.docker.com/r/elswork/samba "elswork/samba on Docker Hub") | [](https://hub.docker.com/r/elswork/samba "elswork/samba on Docker Hub") | [](https://hub.docker.com/r/elswork/samba "elswork/samba on Docker Hub") | [](https://microbadger.com/images/elswork/samba "elswork/samba on microbadger.com") | | ||
|
||
## Build Instructions | ||
|
||
Build for amd64, armv7l, aarch64 architecture (thanks to its [Multi-Arch](https://blog.docker.com/2017/11/multi-arch-all-the-things/) base image) | ||
|
||
``` sh | ||
docker build -t elswork/samba . | ||
``` | ||
|
||
## Usage | ||
|
||
I use it to share files between Linux and Windows, but it has many other capabilities. | ||
|
||
### Serve | ||
|
||
Start a samba fileshare. | ||
|
||
|
||
``` sh | ||
docker run -d -p 137:137/udp -p 138:138/udp -p 139:139 -p 445:445 -p 445:445/udp --hostname 'filer' -v /mnt/store/smb:/share/folder elswork/samba -u "your_username:your_password" -s "FileShare:/share/folder:rw:your_username" | ||
``` | ||
On Windows point your filebrowser to `\\host-ip\FileShare` to preview site. | ||
# Samba | ||
|
||
A [Docker](http://docker.com) file to build images for AMD & ARM devices with a installation of [Samba](https://www.samba.org/) that is the standard Windows interoperability suite of programs for Linux and Unix. This is my personal Multi-architecture docker recipe. | ||
|
||
> Be aware! You should read carefully the usage documentation of every tool! | ||
## Thanks to | ||
|
||
- [Samba](https://www.samba.org/) | ||
- [dastrasmue rpi-samba](https://github.com/dastrasmue/rpi-samba) | ||
|
||
## Details | ||
|
||
- [GitHub](https://github.com/DeftWork/samba) | ||
- [Deft.Work my personal blog](http://deft.work/Samba) | ||
|
||
| Docker Hub | Docker Pulls | Docker Stars | Size/Layers | | ||
| --- | --- | --- | --- | | ||
| [samba](https://hub.docker.com/r/elswork/samba "elswork/samba on Docker Hub") | [](https://hub.docker.com/r/elswork/samba "elswork/samba on Docker Hub") | [](https://hub.docker.com/r/elswork/samba "elswork/samba on Docker Hub") | [](https://microbadger.com/images/elswork/samba "elswork/samba on microbadger.com") | | ||
|
||
## Build Instructions | ||
|
||
Build for amd64, armv7l, aarch64 architecture (thanks to its [Multi-Arch](https://blog.docker.com/2017/11/multi-arch-all-the-things/) base image) | ||
|
||
``` sh | ||
docker build -t elswork/samba . | ||
``` | ||
|
||
## Usage | ||
|
||
I use it to share files between Linux and Windows, but it has many other capabilities. | ||
|
||
### Serve | ||
|
||
Start a samba fileshare. | ||
|
||
|
||
``` sh | ||
docker run -d -p 137:137/udp -p 138:138/udp -p 139:139 -p 445:445 -p 445:445/udp --hostname 'filer' -v /mnt/store/smb:/share/folder elswork/samba -u "your_username:your_password" -s "FileShare:/share/folder:rw:your_username" | ||
``` | ||
On Windows point your filebrowser to `\\host-ip\FileShare` to preview site. |
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 |
---|---|---|
@@ -1 +1 @@ | ||
2.3.0 | ||
3.1.1 |
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