There are two ways to do so. Either you can create a dynamic container, or you can create a regular container with the option 'Randomize disk space in the background' selected. The randomizing process is needed for complete security and it takes the long time. If the option is set, the randomizing process is launched automatically in the background, when the container is mounted. It is completed to about 95% of allocated space being overwritten so as to avoid overfilling.