I’m trying to use the compose-cli in a CLI I’m building to remove the docker-compose dependence.
Currently we have something like-
exec.Command("docker-compose", "-f", utils.DockerComposeFile, "up", "-d")
But we want to use the compose-cli API to run docker-compose commands.
I found this function in
// Up executes the equivalent to a `compose up` Up(ctx context.Context, project *types.Project, options UpOptions) error
This is exactly what we want but I could not find any implementation of this or any docs for this. I’m not sure how to pass in the
project argument and all.
Could someone please guide me? Sorry if this is a noob question…