I have a container up and running on my raspberry PI 3. I have a couple of cron jobs setup but I cant find where the log file entries are going. Any suggestion where I can find them?
What file have you told the job to log to?
Sorry, I’m new to resin.io and new to Docker.
I didn’t specify where to log cron runs. My device is a raspberry Pi 3 running ResinOS. My Dockerfile.template is pasted below. I’ve looked in the standard places for raspberry PI and Linux systems but I cant seem to find them.
Install other apt deps
RUN apt-get update && apt-get install -y \
cron && rm -rf /var/lib/apt/lists/*
Set Xorg and FLUXBOX preferences
RUN mkdir ~/.fluxbox
RUN echo “xset s off” > ~/.fluxbox/startup && echo “xserver-command=X -s 0 dpms” >> ~/.fluxbox/startup
RUN echo “#!/bin/bash” > /etc/X11/xinit/xserverrc \
&& echo “” >> /etc/X11/xinit/xserverrc \
&& echo ‘exec /usr/bin/X -s 0 dpms -nocursor -nolisten tcp “$@”’ >> /etc/X11/xinit/xserverrc
Defines our working directory in container
Copies the package.json first for better cache on later pushes
COPY package.json package.json
This install npm dependencies on the resin.io build server,
making sure to clean up the artifacts it creates in order to reduce the image size.
RUN JOBS=MAX npm install --production --unsafe-perm && npm cache clean && rm -rf /tmp/*
This will copy all files in our root to the working directory in the container
COPY . ./
Install cronjobs to turn display on and off
RUN crontab jobs.txt
Enable systemd init system in container
ENV INITSYSTEM on
CMD [“bash”, “/usr/src/app/start.sh”]
Okay, are you looking in the Host OS or inside the container? I presume this is a single container setup?
I looked in both places. The cron is running inside the container. Yes its a single container setup.