Follow this guide about how it is done: https://levelup.gitconnected.com/dockerized-crud-restful-api-with-go-gorm-jwt-postgresql-mysql-and-testing-61d731430bd8
victorsteven/Dockerized-Golang-Postgres-Mysql-API
This is the dockerized version of the api built here: https://github.com/victorsteven/Go-JWT-Postgres-Mysql-Restful-API
Go