Docker Community Forums

Share and learn in the Docker community.

Issue in dockerfile: Service not starting Jobber

Hi all,

I have an issue which I do not understand on my own. Maybe one of you can give me a hint, how to proceed.

I want to use Jobber as a scheduler for scripts - Shell Scripts and SQL Scripts). Therefore I need to add the MYSQL-Client to the Jobber image.

I tried to achieve this by the following approach:

dockerfile:

FROM jobber:latest
User root

COPY install-packages.sh .
RUN chmod +x ./install-packages.sh
RUN ./install-packages.sh

Content of install-packages.sh:

apk update
apk upgrade
apk add mysql-client
rm -rf /var/cache/apk/*

My docker build command:

docker build . -t jobbermysql:20210110

My docker-compose file:

version: '3'

services:
  jobbermysql:
    image: jobbermysql:20210110
    container_name: jobbermysqlcompose
    restart: always
    volumes:
      - /home/docker/datapath/jobber/jobberuser:/home/jobberuser

The docker build works fine. but when I run an instance of my image jobbermysql:20210110 jobber always reports:

 jobbermysqlcompose | User root doesn't own jobfile

If I try to get some additional information / jobs via direct access to the running container (e.g. a jobber init command to understand the issues)

/home/jobberuser # jobber init
Jobber doesn't seem to be running for user root.
(No socket at /var/jobber/0/cmd.sock.): stat /var/jobber/0/cmd.sock: no such file or directory

If I restart the “old” default jobber version (without my modification of mysql-client) it’s working fine. And they both use the same volume mapping. So I think I have destroyed something in the docker build process.

Can somebody give me an hint?

Many Thanks and Kind regads
Itchy2

Log:
bash-4.3# jobber list
NAME STATUS SEC/MIN/HR/MDAY/MTH/WDAY NEXT RUN TIME NOTIFY ON ERR NOTIFY ON FAIL ERR HANDLER
Hourly Good 0 20 */4 * * * Feb 17 16:20:00 2016 false false Continue
Daily Good 0 30 1 * * * Feb 18 01:30:00 2016 false false Continue
Weekly Good 0 40 2 * * 5 Feb 19 02:40:00 2016 false false Continue
Monthly Good 0 50 4 1 * * Mar 1 04:50:00 2016 false false Continue
bash-4.3# jobber test Hourly
Running job “Hourly” for user “root”…
Job “Hourly” failed.
New status: Good.

Stdout:

Stderr:
su: unrecognized option: login
BusyBox v1.24.1 (2015-12-16 08:00:02 GMT) multi-call binary.

Usage: su [OPTIONS] [-] [USER]

Run shell under USER (by default, root)

-,-l Clear environment, run shell as login shell
-p,-m Do not set new $HOME, $SHELL, $USER, $LOGNAME
-c CMD Command to pass to ‘sh -c’
-s SH Shell to use instead of user’s default
bash-4.3# su --help
BusyBox v1.24.1 (2015-12-16 08:00:02 GMT) multi-call binary.

Usage: su [OPTIONS] [-] [USER]

Run shell under USER (by default, root)

-,-l Clear environment, run shell as login shell
-p,-m Do not set new $HOME, $SHELL, $USER, $LOGNAME
-c CMD Command to pass to ‘sh -c’
-s SH Shell to use instead of user’s default

Hi lehwish95,

many thanks for your replay. How did you create this log?

It sounds like something with the user gone wrong or the variables $HOME, $SHELL, $USER, $LOGNAME are reassigned. Do you have an Idea what I did wrong?

kind regards
Itchy2