diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..d7883d6 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,41 @@ +name: Build image + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + + 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 + + - name: Build and push image + uses: docker/build-push-action@v4 + with: + context: ./ + platforms: linux/amd64,linux/arm64 + push: true + tags: ghcr.io/aczwink/samba-domain:latest diff --git a/README.md b/README.md index 4d6796b..a892479 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ Latest documentation available at: https://nowsci.com/#/samba-domain/?id=samba-a 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. @@ -26,7 +29,7 @@ A well documented, tried and tested Samba Active Directory Domain Controller tha ``` 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 . ``` @@ -34,7 +37,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 @@ -105,7 +108,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` @@ -147,7 +150,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 @@ -193,7 +196,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 @@ -253,7 +256,7 @@ docker run -t -i \ --cap-add=SYS_NICE \ --cap-add=SYS_TIME \ --device /dev/net/tun \ - nowsci/samba-domain + aczwink/samba-domain ``` @@ -274,7 +277,7 @@ services: # ----------- samba begin ----------- # samba: - image: nowsci/samba-domain + image: aczwink/samba-domain container_name: samba volumes: - /etc/localtime:/etc/localtime:ro @@ -339,7 +342,7 @@ services: # ----------- samba begin ----------- # samba: - image: nowsci/samba-domain + image: aczwink/samba-domain container_name: samba volumes: - /etc/localtime:/etc/localtime:ro @@ -408,7 +411,7 @@ services: # ----------- samba begin ----------- # samba: - image: nowsci/samba-domain + image: aczwink/samba-domain container_name: samba volumes: - /etc/localtime:/etc/localtime:ro @@ -498,7 +501,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 diff --git a/init.sh b/init.sh index 799eede..94ae24b 100755 --- a/init.sh +++ b/init.sh @@ -74,9 +74,8 @@ appSetup () { " /etc/samba/smb.conf sed -i "s/LOCALDC/${URDOMAIN}DC/g" /etc/samba/smb.conf if [[ $DNSFORWARDER != "NONE" ]]; then - sed -i "/dns forwarder/d" /etc/samba/smb.conf - sed -i "/\[global\]/a \ - \\\tdns forwarder = ${DNSFORWARDER}\ + sed -i "/dns forwarder =/c \ + \\\tdns forwarder = ${DNSFORWARDER}\ " /etc/samba/smb.conf fi if [[ ${INSECURELDAP,,} == "true" ]]; then