docker-hoster icon indicating copy to clipboard operation
docker-hoster copied to clipboard

error mounting "/etc/hosts" to rootfs at "/tmp/hosts"

Open jankamuda opened this issue 1 year ago • 0 comments

Ubuntu 20.04.6 LTS Docker version 24.0.7, build afdd53b

After executing

docker run -v /var/run/docker.sock:/tmp/docker.sock -v /etc/hosts:/tmp/hosts dvdarias/docker-hoster

I have the following error

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/etc/hosts" to rootfs at "/tmp/hosts": mount /etc/hosts:/tmp/hosts (via /proc/self/fd/6), flags: 0x5000: no such file or directory: unknown.
ERRO[0007] error waiting for container:                 

( there is no additional info after container: )

My /ets/hosts

jkamuda@jkamuda-Latitude-9430:~/IdeaProjects/smart-match-service$ cat /etc/hosts
127.0.0.1	localhost
127.0.1.1	jkamuda-Latitude-9430

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

jankamuda avatar Dec 19 '23 07:12 jankamuda