Instead of exec docker command it has possible to use docker packet. For details: https://github.com/dotcloud/docker/blob/master/commands.go