Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

ipv4_address get ignored #2168

@lpoirothattermann

Description

@lpoirothattermann

Hello,

ipv4_address get ignored.

docker-compose.yaml

version: '3.8'

services:

  openvpn:
    container_name: OpenVPN
    networks:
      private_network:
        ipv4_address: 172.28.28.2
    cap_add:
     - NET_ADMIN
    build:
     context: ./OpenVPN/
     dockerfile: Dockerfile
    ports:
     - "1194:1194/udp"
    restart: always
    volumes:
     - ./OpenVPN/openvpn-data/conf:/etc/openvpn

  samba:
    container_name: Samba
    networks:
      private_network:
        ipv4_address: 172.28.28.5
    image: dperson/samba
    environment:
      TZ: 'Europe/Paris'
    networks:
      - private_network
    ports:
      - "137:137/udp"
      - "138:138/udp"
      - "139:139/tcp"
      - "445:445/tcp"
    read_only: false
    tmpfs:
      - /tmp
    restart: always
    stdin_open: true
    tty: true
    volumes:
      - ./Samba/files:/mnt:z
    command: '-n -S -s "Files;/mnt;yes;no;yes;all" -p'


networks:
  private_network:
      ipam:
          driver: default
          config:
              - subnet: "172.28.28.0/24"

Output of ifconfig in container OpenVPN:

eth0      Link encap:Ethernet  HWaddr 02:42:AC:1C:1C:02  
          inet addr:172.28.28.2  Bcast:172.28.28.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4796 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4567 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1476977 (1.4 MiB)  TX bytes:1426120 (1.3 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:192.168.255.1  P-t-P:192.168.255.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:2260 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2196 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:241295 (235.6 KiB)  TX bytes:1007702 (984.0 KiB)

Output of ifconfig in container Samba:

eth0      Link encap:Ethernet  HWaddr 02:42:AC:1C:1C:03  
          inet addr:172.28.28.3  Bcast:172.28.28.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:203 errors:0 dropped:0 overruns:0 frame:0
          TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:30467 (29.7 KiB)  TX bytes:24786 (24.2 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4367 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4367 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:537725 (525.1 KiB)  TX bytes:537725 (525.1 KiB)

Output of docker-compose --version:

Docker Compose version v2.6.0

Output of docker version:

Client: Docker Engine - Community
 Version:           20.10.17
 API version:       1.41
 Go version:        go1.17.11
 Git commit:        100c701
 Built:             Mon Jun  6 23:02:17 2022
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.17
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.11
  Git commit:       a89b842
  Built:            Mon Jun  6 23:00:41 2022
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.6
  GitCommit:        10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
 runc:
  Version:          1.1.2
  GitCommit:        v1.1.2-0-ga916309
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker context inspect context-name:

[
    {
        "Name": "default",
        "Metadata": {
            "StackOrchestrator": "swarm"
        },
        "Endpoints": {
            "docker": {
                "Host": "unix:///var/run/docker.sock",
                "SkipTLSVerify": false
            }
        },
        "TLSMaterial": {},
        "Storage": {
            "MetadataPath": "\u003cIN MEMORY\u003e",
            "TLSPath": "\u003cIN MEMORY\u003e"
        }
    }
]

Output of docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Docker Buildx (Docker Inc., v0.8.2-docker)
  compose: Docker Compose (Docker Inc., v2.6.0)

Server:
 Containers: 2
  Running: 2
  Paused: 0
  Stopped: 0
 Images: 4
 Server Version: 20.10.17
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
 runc version: v1.1.2-0-ga916309
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.15.0-1011-raspi
 Operating System: Ubuntu 22.04 LTS
 OSType: linux
 Architecture: aarch64
 CPUs: 4
 Total Memory: 7.625GiB
 Name: s1
 ID: 4RMA:KQ24:MTWX:3PPI:3ZCV:S3GS:43XT:UCZP:AB62:G2FN:RYEI:2LOJ
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Additional environment details (AWS ECS, Azure ACI, local, etc.):
On RPi4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleInactive issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions