diegogslomp / samba-ad-dc

🐳 Docker image of samba domain controller compiled from source
https://hub.docker.com/r/diegogslomp/samba-ad-dc
GNU General Public License v3.0
48 stars 19 forks source link

Query confusing build outcome #6

Closed SimonMcN closed 1 year ago

SimonMcN commented 1 year ago

Hi, I have modified the docker-compose file in two ways.

1.) specified the debian image and dockerfile for dc1,dc2,dc3 & dc4 2.) specified filesystem paths rather than docker controlled volumes

services:
  dc1:
    image: samba:debian
    restart: unless-stopped
    build:
      context: .
      dockerfile: dockerfiles/debian
      args:
        SMB_VERSION: "${SMB_VERSION:-latest}"
    container_name: dc1
    hostname: DC1
    privileged: true
    environment:
      REALM: DGS.NET
      DOMAIN: DGS
      ADMIN_PASS: Passw0rd
      DNS_FORWARDER: 8.8.8.8
      BIND_NETWORK_INTERFACES: false
    dns_search: dgs.net
    dns:
      - 172.16.238.10
      - 172.16.238.20
      - 172.16.238.30
      - 172.16.238.40
    extra_hosts:
      - "DC1 DC1.dgs.net:172.16.238.10"
      - "DC2 DC2.dgs.net:172.16.238.20"
      - "DC3 DC3.dgs.net:172.16.238.30"
      - "DC4 DC4.dgs.net:172.16.238.40"
    command: bash -c "
      samba-domain-provision &&
      samba -F"
    volumes:
      - ./dc1-local-samba:/usr/local/samba

    networks:
      static-network:
        ipv4_address: 172.16.238.10

  dc2:
    image: samba:debian
    restart: unless-stopped
    build:
      context: .
      dockerfile: dockerfiles/debian
      args:
        SMB_VERSION: "${SMB_VERSION:-latest}"
    container_name: dc2
    hostname: DC2
   privileged: true
    environment:
      REALM: DGS.NET
      DOMAIN: DGS
      ADMIN_PASS: Passw0rd
      DNS_FORWARDER: 8.8.8.8
      BIND_NETWORK_INTERFACES: false
    dns_search: dgs.net
    dns:
      - 172.16.238.20
      - 172.16.238.30
      - 172.16.238.40
      - 172.16.238.10
    extra_hosts:
      - "DC1 DC1.dgs.net:172.16.238.10"
      - "DC2 DC2.dgs.net:172.16.238.20"
      - "DC3 DC3.dgs.net:172.16.238.30"
      - "DC4 DC4.dgs.net:172.16.238.40"
    command: bash -c "
      samba-domain-join DC1 &&
      samba -F"
    volumes:
      - ./dc2-local-samba:/usr/local/samba
    networks:
      static-network:
        ipv4_address: 172.16.238.20
...
...
..

but every time I get a response that samba-tool is missing from the samba-domain-provision script ?

Any ideas please ? Simon

diegogslomp commented 1 year ago

Hello Simon!

This behaviour seems be related to this, when binding on top a filesystem the files are not copied to the folder. Any trouble please let me know.