Create context manager for setting container