Create a container automatically to container Station by YAML code via GUI

Post Reply
vincent1890
Starting out
Posts: 13
Joined: Fri Nov 22, 2019 8:56 pm

Create a container automatically to container Station by YAML code via GUI

Post by vincent1890 » Fri Jul 03, 2020 3:21 am

Hello

I want to create a container automatically thanks to a container Station using the YAML code via GUI available in containerStation directly but this one gives me the error:

Code: Select all

yaml.scanner.ScannerError: while scanning for the next token found character '\t' that cannot start any token in "./docker-compose.yml",line 7, columm 1

Code: Select all

version: '3'
services:
  teamspeak:
    container_name: TeamSpeak3-NKI
    image: teamspeak:latest
    restart: always
	networks:
		qnet-static:
			ipv4_address: 192.168.10.203
	mac_address: 02:42:0F:F4:2E:75
    network_mode: bridge
	mem_limit: 512000000
	cpus: 0.5
    environment:
		TS3SERVER_LICENSE: accept
    ports:
        - 9987:9987/udp
		- 9986:9986/udp
        - 10011:10011
        - 30033:30033
    volumes:
      - /ContainerMounts/teamspeak3-server_win64_NKI:/var/ts3server
If I replace the code with this one (without tabs):

Code: Select all

In file './docker-compose.yml' service must be a mapping not a nonetype

Code: Select all

version: '3'
services:
teamspeak:
container_name: TeamSpeak3-NKI
image: teamspeak:latest
restart: always
networks:
qnet-static:
ipv4_address: 192.168.10.203
mac_address: 02:42:0F:F4:2E:75
network_mode: bridge
mem_limit: 512000000
cpus: 0.5
environment:
TS3SERVER_LICENSE: accept
ports:
 - 9987:9987/udp
- 9986:9986/udp
- 10011:10011
- 30033:30033
volumes:
- /ContainerMounts/teamspeak3-server_win64_NKI:/var/ts3server
Can somebody help me out, please ?
Qnap TS-877 (64 Go de RAM) 4x6 To WD Red PRO (Raid10), 1x SSD 860 PRO 4 To (VMs Virtual Station + VMs Esxi), 1x SSD 850 EVO 500 Go (cache), 1x WD Enterprise HGST Ultrastar HC510 10 To (Backup Internal speed), 1x WD Black (8 Go Spare for RAID), 1x PCIe ConnectX-3 Pro 10G (2x Link 10 GBit/s)

vincent1890
Starting out
Posts: 13
Joined: Fri Nov 22, 2019 8:56 pm

Re: Create a container automatically to container Station by YAML code via GUI

Post by vincent1890 » Fri Jul 03, 2020 8:55 am

New version but still with errors help me please!
Image

Code: Select all

version: '3'
services:
    teamspeak:
        container_name: TeamSpeak3-NKI
        name: TeamSpeak3-NKI
        image: teamspeak:latest
        restart: always
        autostart: true
        entrypoint: entrypoint.sh
        network:
            bridge:
                interface:
                    bridge: qvs0
                    name: eth4
                    ip: 192.168.10.30
                    gateway: 192.168.10.1
                    netmask: 255.255.255.0
                    display: Adapter 5 (VSwitch LAN)
                mode: static
                mode: bridge
                hostname: TeamSpeak3-NKI
                port: []
                mac_addr: 02:42:0F:F4:2E:75
        environment:
            - TS3SERVER_LICENSE: accept
        resource:
            limit:
                cputime: 150
                memory: 2048m
        volume:
            - "/share/ContainerMounts/teamspeak3-server_win64_NKI:/var/ts3server/:rw"
            
Qnap TS-877 (64 Go de RAM) 4x6 To WD Red PRO (Raid10), 1x SSD 860 PRO 4 To (VMs Virtual Station + VMs Esxi), 1x SSD 850 EVO 500 Go (cache), 1x WD Enterprise HGST Ultrastar HC510 10 To (Backup Internal speed), 1x WD Black (8 Go Spare for RAID), 1x PCIe ConnectX-3 Pro 10G (2x Link 10 GBit/s)

vincent1890
Starting out
Posts: 13
Joined: Fri Nov 22, 2019 8:56 pm

Re: Create a container automatically to container Station by YAML code via GUI

Post by vincent1890 » Fri Jul 03, 2020 3:23 pm

Good volume correction in volumes solves one of the problems but then always this :
Image

Code: Select all

version: '3'
services:
    teamspeak:
        container_name: TeamSpeak3-NKI
        name: TeamSpeak3-NKI
        image: teamspeak:latest
        restart: always
        autostart: true
        entrypoint: entrypoint.sh
        network:
            bridge:
                interface:
                    bridge: qvs0
                    name: eth4
                    ip: 192.168.10.30
                    gateway: 192.168.10.1
                    netmask: 255.255.255.0
                    display: Adapter 5 (VSwitch LAN)
                mode: static
                mode: bridge
                hostname: TeamSpeak3-NKI
                port: []
                mac_addr: 02:42:0F:F4:2E:75
        environment:
            TS3SERVER_LICENSE: accept
        resource:
            limit:
                cputime: 150
                memory: 2048m
        volumes:
            - "/share/ContainerMounts/teamspeak3-server_win64_NKI:/var/ts3server/:rw"
If I delete the part "resource" the same message but on the part "name" if I delete the part "name" the same message on "network" so what’s the problem?
Qnap TS-877 (64 Go de RAM) 4x6 To WD Red PRO (Raid10), 1x SSD 860 PRO 4 To (VMs Virtual Station + VMs Esxi), 1x SSD 850 EVO 500 Go (cache), 1x WD Enterprise HGST Ultrastar HC510 10 To (Backup Internal speed), 1x WD Black (8 Go Spare for RAID), 1x PCIe ConnectX-3 Pro 10G (2x Link 10 GBit/s)

drewy
New here
Posts: 5
Joined: Fri Feb 07, 2020 4:59 am

Re: Create a container automatically to container Station by YAML code via GUI

Post by drewy » Sat Jul 04, 2020 3:12 am

Hey Vincent.
I didn’t see this until after I replied to your other post in reply to me.

So, yes. As you’ve discovered yaml is a “challenge” and very picky about spaces, tabs etc. I haven’t used the resource clause so can’t comment directly on that but from my experience the error message could be a red herring, the problem may be someplace else in the file.
And it may be something simple like a space missing or one too many.
All I can suggest is try simplifying it, try narrowing down what is causing the issue.

vincent1890
Starting out
Posts: 13
Joined: Fri Nov 22, 2019 8:56 pm

Re: Create a container automatically to container Station by YAML code via GUI

Post by vincent1890 » Tue Jul 28, 2020 7:12 am

Hello everyone,

I finally managed to advance on the automatic creation of container thanks to Docker Compose directly in Container Station

Only the party creating a bridge network that I have not yet completely managed to do, so I have to create a first storyteller with bridge - IP static thanks to this creation to contairer it create a new network "qnet-static-eth4-ae19be" for me.

Info recover by connecting SSH to qnap and running the command: docker network ls this will display several NetWork IDs so:

Code: Select all

NETWORK ID / NAME / DRIVER / SCOPE
b5b52658fcf4 / qnet-static-eth4-ae19be / qnet / local
To check which network id is right for you use the following command:

Code: Select all

docker inspect <NAME>

Code: Select all

docker inspect qnet-static-eth4-ae19be
Following this, here is the final code:

Code: Select all

version: '3'

services:
   teamspeak:
     image: teamspeak:latest
     networks:
       default:
         ipv4_address: 192.168.10.203
     restart: always
     environment:
       TS3SERVER_LICENSE: accept
     volumes:
       - /share/CACHEDEV1_DATA/ContainerMounts/teamspeak3-server_win64_NKI:/var/ts3server:rw

volumes:
    teamspeak:

networks:
  default:
    external:
      name: qnet-static-eth4-ae19be
So wait to see at the next version of the docker teamspeak if during the simple restart container station/ Qnap Nas/ or simply the reboot of APP in container station if all this updates correctly with latest version of docker image.
This would avoid recreating everything manually each time.
I’ll keep you posted.
Qnap TS-877 (64 Go de RAM) 4x6 To WD Red PRO (Raid10), 1x SSD 860 PRO 4 To (VMs Virtual Station + VMs Esxi), 1x SSD 850 EVO 500 Go (cache), 1x WD Enterprise HGST Ultrastar HC510 10 To (Backup Internal speed), 1x WD Black (8 Go Spare for RAID), 1x PCIe ConnectX-3 Pro 10G (2x Link 10 GBit/s)

vincent1890
Starting out
Posts: 13
Joined: Fri Nov 22, 2019 8:56 pm

Re: Create a container automatically to container Station by YAML code via GUI

Post by vincent1890 » Thu Aug 06, 2020 9:35 am

vincent1890 wrote:
Tue Jul 28, 2020 7:12 am
Hello everyone,

Only the party creating a bridge network that I have not yet completely managed to do, so I have to create a first storyteller with bridge - IP static thanks to this creation to contairer it create a new network "qnet-static-eth4-ae19be" for me.

For create networks :
Exemple lan : 192.168.1.x

Code: Select all

docker network create qnet-static-eth1 --driver qnet --ipam-driver qnet --ipam-opt iface=eth1 --subnet=192.168.1.0/24 --gateway=192.168.1.1
Bye
Qnap TS-877 (64 Go de RAM) 4x6 To WD Red PRO (Raid10), 1x SSD 860 PRO 4 To (VMs Virtual Station + VMs Esxi), 1x SSD 850 EVO 500 Go (cache), 1x WD Enterprise HGST Ultrastar HC510 10 To (Backup Internal speed), 1x WD Black (8 Go Spare for RAID), 1x PCIe ConnectX-3 Pro 10G (2x Link 10 GBit/s)

Post Reply

Return to “Container Station”