Also set the restart policy when creating a container to avoid race conditions when querying the container configuration from another thread.