Give a instantiated prefab a parent

I would like to make an instantiated object the child of the object it spawns on. The object it spawns on is an empty game object.

It keeps giving me an error “setting parent of a transform in a prefab is disabled to prevent data loss”

The ultimate goal is to have the object “container” spawn on the empty game object as its child. I am fairly sure i am doing something wrong with the transform, but i can’t figure out what. :s

The containers are only spawned in once when the game starts.

Instantiate(container, new Vector3(currentX, currentY, currentZ), Quaternion.Euler(-90, 0, 0));
                    container.transform.parent = transform;

public Transform yourParent;

container.transform.SetParent(yourParent); // needs to be of type transform