Move into api routers instead of main
This commit is contained in:
16
services/entry/pkg/infrastructure/dependencies/docker.go
Normal file
16
services/entry/pkg/infrastructure/dependencies/docker.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package dependencies
|
||||
|
||||
import (
|
||||
"github.com/docker/docker/client"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func setupDocker(l *zap.Logger) *client.Client {
|
||||
l.Info("Setting up Docker")
|
||||
cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return cli
|
||||
}
|
Reference in New Issue
Block a user