Closed symgryph closed 3 years ago
I figured it out. you have to specify the registry to pull form (short names don't seem to work). So your "FROM" must specify the registry in front of it (for anyone else having trouble with dns short name resolution). This seems to be a podman issue that was recently fixed.
FROM docker.io/golang:1.16.7-alpine3.14 as builder
ENV GO111MODULE=auto
This will fix the error.
Hey @symgryph! As you figured out, this is a Podman issue; you can find further info here. The "cannot prompt without a TTY" is because podman is communicating with its runtime that lives inside the virtual machine. You can also file an issue at containers/podman, but the fine folks from Red Hat already mentioned this here: https://github.com/containers/podman/issues/11530#issuecomment-917564959
In Mac OS, that was what I done:
ssh into the virtual machine
podman machine ssh
Edit the file /etc/containers/registries.conf
vi /etc/containers/registries.conf
Change short-name-mode="enforcing"
to short-name-mode="permissive"
I am running 'currentest' (as of this writing) and when I try to build I get the following error:
Error: error creating build container: short-name resolution enforced but cannot prompt without a TTY
command is: podman build -t myfile:latest .
Dockerfile: