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

**URL:** <https://forums.balena.io/t/how-to-find-error-output-from-failed-cmd-python3-main-py-container-start/2803>\
**Category:** Product support\
**Created:** [March 23, 2018, 10:38pm UTC](https://forums.balena.io/t/how-to-find-error-output-from-failed-cmd-python3-main-py-container-start/2803 "2018-03-23T22:38:27Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![aka](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/aka/32/831_2.png) [@aka](https://forums.balena.io/u/aka)\
**Post date:** [March 28, 2018, 8:52pm UTC](https://forums.balena.io/t/how-to-find-error-output-from-failed-cmd-python3-main-py-container-start/2803/8 "2018-03-28T20:52:06Z")

</div>

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](https://forums.balena.io/t/cant-find-crontab-or-systemctl-in-beaglebone-debian-image-what-am-i-doing-wrong/2804/21). The RasPi Zero Dockerfile is here:

```auto
# 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

---

_[View the full topic](https://forums.balena.io/t/how-to-find-error-output-from-failed-cmd-python3-main-py-container-start/2803)._
