Siemens Simatic IOT2040

after being able to deploy some services on a Raspberry Pi, a balenaFin and a RevPi Core 3, now I’m trying to do the same on a Siemens Simatic IOT2040 but… it doesn’t work. The service keeps restarting, and I can’t get even a simple output.

Is anyone being able to successfully run something on this platform?


Hi there
Could you share some additional information here? What’s your OS version and the errors encountered? Also, could you share a minimum Dockerfile/compose file we could use for reproducing that behavior? Thanks!

Hi Michael,
I’m running Resin OS 2.12.7+rev2 and all I can see is that the service is restarting over and over.


# base-image for node on any machine using a template variable,
# see more about dockerfile templates here:
# and about balena base images here:
# FROM balenalib/%%BALENA_MACHINE_NAME%%-node:6-stretch-run

FROM balenalib/iot2000-debian:buster-run

# remove several traces of debian python
RUN apt-get purge -y python.*

# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

# install python dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
		ca-certificates \
		netbase \
	&& rm -rf /var/lib/apt/lists/*

# key 63C7CC90: public key "Simon McVittie <>" imported
# key 3372DCFA: public key "Donald Stufft (dstufft) <>" imported
RUN gpg --batch --keyserver --recv-keys 4DE8FF2A63C7CC90 \
	&& gpg --batch --keyserver --recv-key 6E3CBCE93372DCFA \
	&& gpg --batch --keyserver --recv-keys 0x52a43a1e4b77b059


# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"


RUN set -x \
	&& buildDeps=' \
		curl \
	' \
	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
	&& curl -SLO "$PYTHON_VERSION/Python-$PYTHON_VERSION.linux-i386-openssl1.1.tar.gz" \
	&& echo "7259ee9bce64d1ab714d93cc183fa89283c894036cfc7c76d21f23727e3f8f26  Python-$PYTHON_VERSION.linux-i386-openssl1.1.tar.gz" | sha256sum -c - \
	&& tar -xzf "Python-$PYTHON_VERSION.linux-i386-openssl1.1.tar.gz" --strip-components=1 \
	&& rm -rf "Python-$PYTHON_VERSION.linux-i386-openssl1.1.tar.gz" \
	&& ldconfig \
	&& if [ ! -e /usr/local/bin/pip3 ]; then : \
		&& curl -SLO "" \
		&& echo "19dae841a150c86e2a09d475b5eb0602861f2a5b7761ec268049a662dbd2bd0c" | sha256sum -c - \
		&& python3 \
		&& rm \
	; fi \
	&& pip3 install --no-cache-dir --upgrade --force-reinstall pip=="$PYTHON_PIP_VERSION" setuptools=="$SETUPTOOLS_VERSION" \
	&& find /usr/local \
		\( -type d -a -name test -o -name tests \) \
		-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
		-exec rm -rf '{}' + \
	&& cd / \
	&& apt-get purge -y --auto-remove $buildDeps \
	&& rm -rf /usr/src/python ~/.cache

# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \
	&& ln -sf pip3 pip \
	&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
	&& ln -sf idle3 idle \
	&& ln -sf pydoc3 pydoc \
	&& ln -sf python3 python \
	&& ln -sf python3-config python-config

# set PYTHONPATH to point to dist-packages
ENV PYTHONPATH /usr/lib/python3/dist-packages:$PYTHONPATH

# use `install_packages` if you need to install dependencies,
# for instance if you need git, just uncomment the line below.
# RUN install_packages git

# Defines our working directory in container
WORKDIR /usr/src/app

# Copies the package.json first for better cache on later pushes
# COPY package.json package.json

# This install npm dependencies on the balena 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 && rm -rf /tmp/*

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

# Enable udevd so that plugged dynamic hardware devices show up in our container.

# server.js will run when container starts up on the device
CMD ["python3", ""]

import time

while 1 == 1:
  print("hello world!")


Hello @mcomisso , can you please allow support access for this device and provide us its uuid or dashboard link?

Hello Alexis,
UUID 328601c294669458351f678aa8afef89 and access granted!


Thanks, I’m doing some tests on the device.

Ok, it turns out Debian does not run on Intel quark processors, see .
And this is the processor iot2000 devices use.
Sorry this took some time :slight_smile:
I’ve pinged our team to remove the Debian base images for iot2000.
You can use Alpine base images instead (I’ve tested one, it works) but you’ll need to adapt your Dockerfile (replace apt-get with apk, etc…).

Hi Alexis,
thank you very much for your support!

I’ll try with Alpine but I’m quite sure that this time it will work as expected.

I suggest your team to also update the “Getting started” page for this device ( since it points to the “simple-server-node” project that uses the Debian stretch image. This is mainly why I ended on using that distro…

Thanks again!