Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container infinite restart loop/crash when building the image with podman build #211

Open
Lacedaemon opened this issue Jul 2, 2023 · 1 comment

Comments

@Lacedaemon
Copy link

The following error is spammed over and over when using podman-compose with a docker-compose.yaml on custom image built with podman build:

S6-overlay-suexec: fatal: can only run as pid 1

The solve was adding the following to docker-compose.yaml before running podman-compose:

services:
  pihole:
    [...]
    entrypoint: ["/bin/bash", "-c", "./s6-init"]
    [...]

Found this out when looking at the entrypoints displayed for each image in Cockpit. /bin/sh was used in the podman build image, while /bin/bash was used for the original image.

Hopefully this saves someone some time. If anyone has a better way of doing this, please share!

@arielnmz
Copy link

I was also able to solve this by commenting out the ENTRYPOINT at the end of the Dockerfile from the 1-container solution:

ARG PIHOLE_VERSION
FROM pihole/pihole:latest
RUN apt update && apt install -y unbound

COPY lighttpd-external.conf /etc/lighttpd/external.conf
COPY unbound-pihole.conf /etc/unbound/unbound.conf.d/pi-hole.conf
COPY 99-edns.conf /etc/dnsmasq.d/99-edns.conf
RUN mkdir -p /etc/services.d/unbound
COPY unbound-run /etc/services.d/unbound/run

# ENTRYPOINT ./s6-init

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants