Is it possible, and if so what is the correct syntax for passing the host i2c port, or some other peripheral to the container, via definition in the dockerfile?
Here is a basic dockerfile -
#Deriving the latest base image
FROM python:latest
#Labels as key value pair
LABEL Maintainer="nice try"
# Any working directory can be chosen as per choice like '/' or '/home' etc
WORKDIR /usr/app/src
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
#to COPY the remote file at working directory in container
COPY main.py ./
# Now the structure looks like this '/usr/app/src/test.py'
#CMD instruction should be used to run the software
#contained by your image, along with any arguments.
CMD [ "python", "./main.py"]
I'm aware that i can do it from the command line when running the container, but this doesn't seem like a neat solution.
Thanks!