How to run testcafe from local on chrome docker image

I don’t want to install chrome to run testcafe and want to use a chrome docker image.

docker run -d -p 4444:4444 selenium/standalone-chrome


docker container ls
CONTAINER ID        IMAGE                        COMMAND                  CREATED             STATUS              PORTS                    NAMES
3487d6a08310        selenium/standalone-chrome   "/opt/bin/entry_poin…"   About an hour ago   Up About an hour>4444/tcp   charming_proskuriakova

Step3: This code works for python2.7

from selenium import webdriver

from selenium.webdriver.common.desired_capabilities import DesiredCapabilities


print driver.title

I am looking to use same functionality for testcafe. Base code(test1.js):

    import { Selector } from 'testcafe';

    fixture `Getting Started`
        .page ``;

    test('My first test', async t => {
        // Test code

Execution on local Chrome:

testcafe chrome test1.js

I am looking for method to replace chrome with docker image. I know, chrome is inbuilt with testcafe, you can consider “safari” or any other browser in place of chrome. IDea is learn to use docker image in testcafe.
PS: I dont want to use testcafe/testcafe image since my issue is not running testcafe in docker , but only browser in docker.

Source: StackOverflow