docker systemd: how i can automatically start a container while setting up a service in systemd (BASH)

  bash, containers, docker, scripting, systemd

I will run a docker container with the command
docker run -ti --rm -p 8080:80 -v $(pwd)/my/path/to/config myimage:latest
but the plan is to write a function in a script, that start these image, while starting the VM in systemd.
Do I have to set up a service in /lib/systemd/system ?

Source: Docker Questions