Cannot change tcp keep alive for a docker container

I am not able to change tcp keep alive for my container with docker-compose. I have tried the below docker-compose.

version: '2'

services:
  ### DCX CS Instance ###
  dcx-cs:
    image: xyz
    privileged: true
    sysctls:
         # This is where I try to change.
         net.ipv4.tcp_keepalive_time: 4
    hostname: dcx-cs
    restart: always
    ports:
      # external:internal
      - "8088:9980"
      - "127.0.0.1:1234:1234"
    volumes:
      - ../../../target:/home
    links:
      - rabbitmq-cs
      - rabbitmq-server
    environment:
      SERVER_PORT: "9980"
      SPRING_RABBITMQ_HOST: "rabbitmq-server"
      DCX_CS_RABBITMQ_HOST: "rabbitmq-cs"
      DCX_CS_RABBITMQ_PORT: "5672"
      DCX_CS_RABBITMQ_API_PORT: "15672"
      LOGGING_PATH: "/home/dcx-cs/logs"
      DCX_CS_DRIVER_DIRECTORY: "/home/driver-artifacts"
      DCX_CS_NODE_FILE_DIRECTORY: "/home/dcx-cs/tmp"
      DCX_CS_NODE_UUID_DIRECTORY: "/home/dcx-cs/uuid/"
      DCX_CS_HEARTBEAT_CYCLE_TIME_SECONDS: "1" # Specifies how ofter the CS sends heartbeats
      DCX_CS_HEARTBEAT_INITIAL_DELAY_SECONDS: "0"
      DCX_CS_DRIVER_DOWNLOAD_PUBLISHER_TIMEOUT_MILLIS: "2000"
      DCX_CS_DRIVER_DOWNLOAD_MAXIMUMREDELIVERIES: "2"
      SPRING_PROFILES_ACTIVE: "local,integration"
    privileged: true



  ### Messaging ###
  rabbitmq-cs:
    image: rabbitmq:3.6-management-alpine
    hostname: rabbitmq-cs
    restart: always
    ports:
      # external:internal
      - "5688:5672"
      - "15688:15672"
      - "32788:32768"

  rabbitmq-server:
    image: rabbitmq:3.6-management-alpine
    hostname: rabbitmq-server
    restart: always
    ports:
      # external:internal
      - "5680:5672"
      - "15680:15672"
      - "32780:32768"

when I do the docker exec xyz cat /proc/sys/net/ipv4/tcp_keepalive_time , it is printing 7200 which is Linux default. There may be an issue with my syntax. please help me with this regard. Thanks in advance.

Source: StackOverflow