These steps are for Mac OS X, a lot of this is copied from https://blog.bilka.sk/how-to-flash-sonoff-mini-in-mac-os/ but added docker and removed the need for adding own AP.
- solder or put jumper between OTA and GND
- Entering the Compatible Pairing Mode (AP) by long press the paring button for 5 seconds after power on
- Connecting the Access Point named ITEAD-XXXXXXXX with default password 12345678 via mobile phone or PC
- Browser visits http://10.10.7.1/
- Filling in the existing WiFi network SSID and password and hit save