baseimage-docker: "seteuid: Operation not permitted" log spam on Heroku docker

I’ve setup a Dockerfile to run on Heroku using a pretty simple dockerfile and the following cmd:

CMD ["/sbin/my_init", "--skip-startup-files"]

Due to an error that prevents syslog-ng from starting because /dev/log is already taken. I’m still able to get the logs so most likely heroku is watching that which prevents syslog from starting but it seems to be running fine with skipping the default startup files so no problems there.

The only issue is after booting runit, the system starts blasting the following log statement

seteuid: Operation not permitted

A quick google shows mostly sshd related results for that output, but I have ssh disabled as by default. I believe that’s because of runit, heroku runs as non-root and so that may be the issue. I will look into setting up ssh so I can open a shell directly into the process, because of Heroku’s process model it makes it difficult to debug the container.

But I hope this use case can be supported without this log spam. Otherwise the container works fine for my purposes currently.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16

Most upvoted comments

I think the good news for baseimage is that actually it works well under non-root. The only problem is with choosing services, but that is unrelated to baseimage.

Cool solved it!

I had thought it was related to cron since ssh is already disabled. No log spam with the following addition to the dockerfile:

RUN touch /etc/service/cron/down && chmod +x /etc/service/cron/down

screenshot 2018-03-03 13 53 22

Dockerfile:

FROM phusion/baseimage:0.10.0

ENV INSTALL_PATH /app

CMD ["/sbin/my_init", "--skip-startup-files"]

RUN apt-get update && apt-get install -qq -y --no-install-recommends \
      python \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN mkdir -p $INSTALL_PATH
WORKDIR $INSTALL_PATH


RUN mkdir /etc/service/server
RUN printf "#\041/bin/bash\n\
set -x\n\
cd /app\n\
exec /usr/bin/python -m SimpleHTTPServer \044PORT\n\
" > /etc/service/server/run
RUN chmod +x /etc/service/server/run

RUN touch /etc/service/cron/down && chmod +x /etc/service/cron/down

COPY . /app

I’ll just add this line in my app’s dockerfile for now