def copy_to(self,
                container: Container,
                fn_host: str,
                fn_container: str
                ) -> None:
        """
        Copies a file from the host machine to a specified location inside a
        container.

        Raises:
            FileNotFound: if the host file wasn't found.
            subprocess.CalledProcessError: if the file could not be copied to
                the container.
        """
        logger.debug("Copying file to container, %s: %s -> %s",
                     container.uid, fn_host, fn_container)

        if not os.path.exists(fn_host):
            logger.error("Failed to copy file [%s] to [%s] in container [%s]: not found.",  # noqa: pycodestyle
                         fn_host, fn_container, container.uid)
            raise FileNotFound(fn_host)

        cmd = "docker cp '{}' '{}:{}'".format(fn_host, container.id, fn_container)
        try:
            subprocess.check_output(cmd, shell=True)
            logger.debug("Copied file to container, %s: %s -> %s",
                         container.uid, fn_host, fn_container)

            r = self.command(container,
                             "sudo chown $(whoami) '{}'".format(fn_container))
            if r.code != 0:
                m = "failed to update permissions for container file [{}] (exit code: {}): {}"  # noqa: pycodestyle
                m = m.format(fn_container, r.code, r.output)
                raise BugZooException(m)
        # TODO implement error handling
        except subprocess.CalledProcessError:
            logger.exception("Failed to copy file to container, %s: %s -> %s",
                             container.uid, fn_host, fn_container)
            raise
Copies a file from the host machine to a specified location inside a
        container.

        Raises:
            FileNotFound: if the host file wasn't found.
            subprocess.CalledProcessError: if the file could not be copied to
                the container.