There is an example of compose file to simulate the connection between selenium hub and appium server with connected device(s) in docker solution.
As Android Emulator cannot be run on Apple Silicone you just download its. You can enable SaltStack to control running containers by passing environment variable SALT_MASTER=. My M1 MacBook is going to arrive in mid-February only due to shipment delays. You can enable ATD by passing environment variable ATD=true and bind the port to the host, e.g. Pass environment variable RELAXED_SECURITY=true to disable additional security check to use some advanced features.
Development of the UiAutomator2 driver happens at the appium-uiautomator2-driver repo. The image generates the node config file, if you would like to provide your own config pass the following parameters: be it a physical device or an emulator, you need to run a local instance of Appium, and have the necessary tools to automate Android or iOS devices. Appiums flagship support for automating Android apps is via the UiAutomator2 driver.(New to Appium Read our introduction to Appium drivers).This driver leverages Googles UiAutomator2 technology to facilitate automation on a device or emulator.