How to find error output from failed CMD["python3", "main.py"] container start

Thanks for the reply!

The topic title is wrong, my apologies… my CMD line does in fact point to src/main.py…the Dockerfile for BBB that initiated this topic is available in this thread. The RasPi Zero Dockerfile is here:

# base-image for python on any machine using a template variable,
# see more about dockerfile templates here:http://docs.resin.io/pages/deployment/docker-templates
FROM resin/%%RESIN_MACHINE_NAME%%-debian

# RUN apt-get update && apt-get install -y  && \
#    apt-get clean && rm -rf /var/lib/apt/lists/*

RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    cron \
    systemd \
    python \
    python-pip \
    pkg-config \
    python-dev \
    python-dbus \
    python-setuptools \
    libusb-1.0.0  \
    libusb-1.0.0-dev  \
    git  \
    cython \
    cython3 \
    g++ \
    cmake \
    git-core  \
    libudev-dev  \
    libusbhid-common  \
    libusb-dev \
    build-essential  \
    python-smbus \
    python3 \
    python3-setuptools \
    python3-dbus \
    python3-pip \
    python3-dev \
    python-smbus \
    python-psutil \
    avahi-daemon \
    avahi-utils \
    libnss-mdns \
    redis-server \
    wireless-tools


# switch on systemd init system in container
ENV INITSYSTEM on

# Set our working directory
WORKDIR /usr/src/app

# Copy requirements.txt first for better cache on later pushes
COPY ./requirements.txt /requirements.txt

# pip install python deps from requirements.txt on the resin.io build server
RUN pip3 install -r /requirements.txt # blink1 library that i like is only for python3!!

# try to install blink1 pip3 library without hitting pypi repo b/c repo is unmaintained
RUN git clone https://github.com/todbot/blink1.git && cd blink1/commandline && make
RUN cd blink1/python/pypi && python3 setup.py install

# This will copy all files in our root to the working  directory in the container
COPY . ./

RUN echo "*/1 * * * * cd /usr/src/app/src && python3 spt.py >/proc/1/fd/1" | crontab

# main.py will run when container starts up on the device
CMD ["python3","src/main.py"]

…I found I need to install so many things because I had issues with the default python base image for BBB (more detail on that in the other thread).

I’m not sure how much of the codebase you can see - if there’s something I can do to grant more access/visibility to you, please let me know.

Thanks!

AKA