func (d *VolumeDirective) update(state *parsingState) error {
	return state.addToCurrStage(d)
}
Add this command to the build stage.
package dockerfile
import (
	"strings"
)
type VolumeDirective struct {
	*baseDirective
	Volumes []string
}
func newVolumeDirective(base *baseDirective, state *parsingState) (Directive, error) {
	if err := base.replaceVarsCurrStage(state); err != nil {
		return nil, err
	}
	if volumes, ok := parseJSONArray(base.Args); ok {
		return &VolumeDirective{base, volumes}, nil
	}
	args := strings.Fields(base.Args)
	if len(args) == 0 {
		return nil, base.err(errMissingArgs)
	}
	return &VolumeDirective{base, args}, nil
}