Homeassistant Docker use shell_command to execute Python script

I moved my HA setup a to Docker. Everything went smooth but I’m facing one little problem:

In my old setup I used a shell_command to execute a python script to upload gasmeter-readings to mindergas.nl

How can I achieve the same now that my HA is running in a docker container ?

I’m in the process of moving all my scripts to a separate folder on my ubuntu server, I have a simple bash script that calls all my subscripts and I’ve change my scripts to publish commands and statuses on MQTT before I can fully move to docker. Not sure if it’s the best way but for now I’m achieving the same results with the additional bonus of HA getting initialised with the correct state for all devices.

You would normally use ssh to run commands on the host, although you can build a new docker container if you want to run the commands in the container.

Lots of relevant discussion here