Is it possible to install leaf packages from an existing leaf-workspace.json?

I’m trying to get leaf to automatically setup in a docker container. Do I have to specify packages to install to a profile, or is there a command to get leaf to install based on an existing leaf-workspace.json which already specifies the profile and packages?

Found it here: Leaf Setup - Legato Docs

i.e.
leaf select [profile] && leaf profile sync