From d8af39488ff00934082c1f03c85b49e4d2ecdb6f Mon Sep 17 00:00:00 2001 From: aczwink Date: Sun, 27 Aug 2023 22:17:20 +0200 Subject: [PATCH 1/7] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 746cfb8..e6a8428 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ A well documented, tried and tested Samba Active Directory Domain Controller that works with the standard Windows management tools; built from scratch using internal DNS and kerberos and not based on existing containers. +## This fork +This is a fork of the amazing samba-domain by Fmstrat. Unfortunately the original repository does not provide a ARM 64 version via DockerHub (it only provides AMD 64). This fork is only there for providing a built image on that architecture. + ## Environment variables for quick start * `DOMAIN` defaults to `CORP.EXAMPLE.COM` and should be set to your domain * `DOMAINPASS` should be set to your administrator password, be it existing or new. This can be removed from the environment after the first setup run. From 5b36fd9e405fbb594019a93e86c3c96750f621d1 Mon Sep 17 00:00:00 2001 From: aczwink Date: Sun, 27 Aug 2023 22:27:34 +0200 Subject: [PATCH 2/7] Create docker-image.yml --- .github/workflows/docker-image.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..f8f44ad --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,30 @@ +name: Build image + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and push image + uses: docker/build-push-action@v4 + with: + context: ./ + platforms: linux/arm64 + push: true + tags: aczwink/samba-domain:latest From da55da17728b418432c2251ad0b2a9e7906afcf6 Mon Sep 17 00:00:00 2001 From: aczwink Date: Sun, 27 Aug 2023 22:37:14 +0200 Subject: [PATCH 3/7] Update docker-image.yml --- .github/workflows/docker-image.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f8f44ad..3fb005d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -8,15 +8,26 @@ on: jobs: - build: + build-and-push-image: runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: - uses: actions/checkout@v3 - name: Set up QEMU uses: docker/setup-qemu-action@v2 + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 From a2f01fabd11d507918b3cb16de34cfc26232597a Mon Sep 17 00:00:00 2001 From: aczwink Date: Sun, 27 Aug 2023 22:40:21 +0200 Subject: [PATCH 4/7] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3fb005d..a034f91 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -38,4 +38,4 @@ jobs: context: ./ platforms: linux/arm64 push: true - tags: aczwink/samba-domain:latest + tags: ghcr.io/aczwink/samba-domain:latest From aaee44a16d5f2e49ad6c6e51649b2c411cfa1e27 Mon Sep 17 00:00:00 2001 From: aczwink Date: Sun, 27 Aug 2023 22:42:01 +0200 Subject: [PATCH 5/7] Update README.md --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e6a8428..7d9e2d5 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ This is a fork of the amazing samba-domain by Fmstrat. Unfortunately the origina ``` mkdir -p /data/docker/builds cd /data/docker/builds -git clone https://github.com/Fmstrat/samba-domain.git +git clone https://github.com/aczwink/samba-domain.git cd samba-domain docker build -t samba-domain . ``` @@ -35,7 +35,7 @@ docker build -t samba-domain . Or just use the HUB: ``` -docker pull nowsci/samba-domain +docker pull ghcr.io/aczwink/samba-domain ``` ## Setting things up for the container @@ -106,7 +106,7 @@ Then add a share to the end based on how you mount the volume: Check the samba documentation for how to allow groups/etc. ## Examples with docker run -Keep in mind, for all examples replace `nowsci/samba-domain` with `samba-domain` if you build your own from GitHub. +Keep in mind, for all examples replace `aczwink/samba-domain` with `samba-domain` if you build your own from GitHub. Start a new domain, and forward non-resolvable queries to the main DNS server * Local site is `192.168.3.0` @@ -148,7 +148,7 @@ docker run -t -i \ -h exampledc \ --name samba \ --privileged \ - nowsci/samba-domain + aczwink/samba-domain ``` Join an existing domain, and forward non-resolvable queries to the main DNS server @@ -194,7 +194,7 @@ docker run -t -i \ -h exampledc \ --name samba \ --privileged \ - nowsci/samba-domain + aczwink/samba-domain ``` Join an existing domain, forward DNS, remove security features, and connect to a remote site via openvpn @@ -254,7 +254,7 @@ docker run -t -i \ --cap-add=SYS_NICE \ --cap-add=SYS_TIME \ --device /dev/net/tun \ - nowsci/samba-domain + aczwink/samba-domain ``` @@ -275,7 +275,7 @@ services: # ----------- samba begin ----------- # samba: - image: nowsci/samba-domain + image: aczwink/samba-domain container_name: samba volumes: - /etc/localtime:/etc/localtime:ro @@ -340,7 +340,7 @@ services: # ----------- samba begin ----------- # samba: - image: nowsci/samba-domain + image: aczwink/samba-domain container_name: samba volumes: - /etc/localtime:/etc/localtime:ro @@ -409,7 +409,7 @@ services: # ----------- samba begin ----------- # samba: - image: nowsci/samba-domain + image: aczwink/samba-domain container_name: samba volumes: - /etc/localtime:/etc/localtime:ro @@ -499,7 +499,7 @@ Usage: ``` ## Joining the domain with Ubuntu -For joining the domain with any client, everything should work just as you would expect if the active directory server was Windows based. For Ubuntu, there are many guides availble for joining, but to make things easier you can find an easily configurable script for joining your domain here: +For joining the domain with any client, everything should work just as you would expect if the active directory server was Windows based. For Ubuntu, there are many guides availble for joining, but to make things easier you can find an easily configurable script for joining your domain here: ## Troubleshooting From 1e464ae8d80bdd33b7242f4dbd559d52cb717be6 Mon Sep 17 00:00:00 2001 From: Amir Czwink Date: Mon, 30 Oct 2023 21:32:23 +0100 Subject: [PATCH 6/7] dns forwarder loop bug fix --- init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.sh b/init.sh index 2203e24..0958a96 100755 --- a/init.sh +++ b/init.sh @@ -72,7 +72,7 @@ appSetup () { " /etc/samba/smb.conf sed -i "s/LOCALDC/${URDOMAIN}DC/g" /etc/samba/smb.conf if [[ $DNSFORWARDER != "NONE" ]]; then - sed -i "/\[global\]/a \ + sed -i "/dns forwarder =/c \ \\\tdns forwarder = ${DNSFORWARDER}\ " /etc/samba/smb.conf fi From 509299f729ce94c41f797bc62428a59827b6e760 Mon Sep 17 00:00:00 2001 From: aczwink Date: Mon, 30 Oct 2023 21:49:31 +0100 Subject: [PATCH 7/7] added amd64 linux build --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index a034f91..d7883d6 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -36,6 +36,6 @@ jobs: uses: docker/build-push-action@v4 with: context: ./ - platforms: linux/arm64 + platforms: linux/amd64,linux/arm64 push: true tags: ghcr.io/aczwink/samba-domain:latest