Installing Rancher on AWS ECS Fargate - Issues with Privileged Mode


I’m currently attempting to install Rancher on AWS ECS Fargate, and I’m encountering an issue related to privileged mode. Here are the details of my task definition and the error message:

  "family": "rancher-task",
  "containerDefinitions": [
      "name": "rancher",
      "image": "rancher/rancher:latest",
      "cpu": 0,
      "portMappings": [
          "name": "rancher-80-tcp",
          "containerPort": 80,
          "hostPort": 80,
          "protocol": "tcp"
          "name": "rancher-443-tcp",
          "containerPort": 443,
          "hostPort": 443,
          "protocol": "tcp"
      "essential": true,
      "environment": [],
      "mountPoints": [],
      "volumesFrom": [],
      "logConfiguration": {
        "logDriver": "awslogs",
        "options": {
          "awslogs-create-group": "true",
          "awslogs-group": "/ecs/rancher-task",
          "awslogs-region": "us-east-1",
          "awslogs-stream-prefix": "ecs"
        "secretOptions": []
  "taskRoleArn": "arn:aws:iam:::role/ecsTaskExecutionRole",
  "executionRoleArn": "arn:aws:iam:::role/ecsTaskExecutionRole",
  "networkMode": "awsvpc",
  "requiresCompatibilities": ["FARGATE"],
  "cpu": "1024",
  "memory": "2048",
  "runtimePlatform": {
    "cpuArchitecture": "X86_64",
    "operatingSystemFamily": "LINUX"

Error Message:

ERROR: Rancher must be run with the --privileged flag when running outside of Kubernetes

I understand that AWS Fargate does not support the --privileged flag directly. How can I resolve this issue and successfully deploy Rancher on AWS ECS Fargate? Are there alternative configurations or workarounds?

Any guidance or suggestions would be greatly appreciated. Thank you!