I assume that you are talking about a chroot. I was unable to do everything using yum from the repository as in Mandragor's answer, but that was enough to get me bootstrapped. I started by installing yum from the Ubuntu repository, as per that answer:
# apt install yum
then installing the Fedora repository package into my chroot:
# server=https://download.fedoraproject.org
# serverpath=pub/fedora/linux/releases/28/Everything/x86_64/os/Packages/f
# serverfile=fedora-repos-28-1.noarch.rpm
# wget $server/$serverpath/$serverfile
# rpm -i --nodeps --force --root=/srv/chroot/fedora28 $serverfile
and then installing dnf into the chroot:
# yum --installroot=/srv/chroot/fedora28 --releasever=28 install -y \
--nogpgcheck dnf
After that I was able to continue using dnf in the chroot:
# cp /etc/resolv.conf /srv/chroot/fedora28/etc
# chroot /srv/chroot/fedora28 dnf --releasever=28 install -y --nogpgcheck \
<packages...>