Hi,
I'm trying to have my container launch without ipv6 in a docker compose YML.
Here is my YML
```container.name:
container_name: container.name
image: haugene/transmission-openvpn:latest
restart: unless-stopped
mem_limit: 1024m
sysctls:
When I launch the container via docker-compose up, I've got this error:
ERROR: The Compose file ‘./docker-compose.yml’ is invalid because:
Unsupported config option for container.name: ‘sysctls’
Any ideas, bad indentation or something else ?
Cheers !
up
Right. This is not an issue with the container/image. And yes, docker-compose supports sysctls option.
Please read the docs for docker-compose: https://docs.docker.com/compose/compose-file/
The sysctls option is introduced in version 2.1, so you need to use that version or a newer one. And I can't see that you are specifying the version at all. Basically, if you just copy the example docker-compose from this repo and change version to 2.1 you should be able to add container_name and sysctls for the transmission service.
Thanks for the answer,
I know this isn't an issue, sorry to bother you, but I've posted on docker hub forum, no answer there.
I will try to specify the version in the YML.
Thanks a lot.
By the way, great job with this container, pretty simple to use and very efficient !
Thank you :) And don't get me wrong - I know the feeling of syntax errors and that it can be tricky to figure it out. But it's also a lot of issues being raised here that is Docker and docker-compose specific. Not to mention just normal networking etc. I need to figure out a way to handle it, or not handle it to be more precise.
Btw. Using the dev version of the image you don't need to mount the tun device either. So you could do something like this:
version: '2.1'
services:
transmission:
image: haugene/transmission-openvpn:dev
container_name: some-container-name
cap_add:
- NET_ADMIN
restart: unless-stopped
ports:
- "9091:9091"
dns:
- 8.8.8.8
- 8.8.4.4
volumes:
- /your/storage/path/:/data
sysctls:
- net.ipv6.conf.all.disable_ipv6=1
environment:
- OPENVPN_PROVIDER=provider
- OPENVPN_USERNAME=username
- OPENVPN_PASSWORD=password
- OPENVPN_OPTS=--inactive 3600 --ping 10 --ping-exit 60
- LOCAL_NETWORK=192.168.0.0/24
- PUID=1000
- PGID=1000
It seems that I managed to deactivate ipv6,using version 3 of docker compose.
I'm not getting a lots of error saying:
Couldn't connect socket 50 to ipv6.....
Thanks a lot for your support, and long live to haugene transmission-openvpn !
See ya.
Great. Haha, long live 👍
Most helpful comment
It seems that I managed to deactivate ipv6,using version 3 of docker compose.
I'm not getting a lots of error saying:
Couldn't connect socket 50 to ipv6.....Thanks a lot for your support, and long live to haugene transmission-openvpn !
See ya.