Podman oci .containerenv: not a directory

Viewed 472

I recently swithed back to podman and got a error with my containers.

Containerfile:

FROM scratch

ADD ./run /

ENTRYPOINT ["/run"]

My applications are all static build go microservices:

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o ${BINARY_NAME} *.go

Everything is managed from a Makefile. Under docker everything worked great, but with podman i get this error.

Error: OCI runtime error: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/run/containers/storage/overlay-containers/5709a135a4f1537fea1fdf8a5750534bc0f782671f115e73201569495024e4fc/userdata/.containerenv" to rootfs at "/run/.containerenv" caused: mount through procfd: open o_path procfd: open /var/lib/containers/storage/overlay/cc55a7c625e1483cc644660c8161db8a4a4a8b9c1120d132f07593834fda1a2c/merged/run/.containerenv: not a directory

My run command is

podman run -d localhost/test:1.0.0

OS information: Ubuntu 21.04
Kernel: 5.11.0-22-generic
Podman: 3.0.1

When i use another container like alpine, it works great under podman.

1 Answers

Just to be sure, do not name the executables, like standard linux directories.

Thanks to Erik Sjölund

Related