public Builder setVolumes(@Nullable Set<AbsoluteUnixPath> volumes) {
      if (volumes == null) {
        this.volumes = null;
      } else {
        Preconditions.checkArgument(
            volumes.stream().allMatch(Objects::nonNull), "volumes list contains null elements");
        this.volumes = new HashSet<>(volumes);
      }
      return this;
    }
Sets the container's volumes.

@param volumes the set of volumes
@return this
jib-core/src/main/java/com/google/cloud/tools/jib/configuration/ContainerConfiguration.java