Added raspberry-pi dockerfile
This commit is contained in:
parent
1af3678ce2
commit
524c3aeb81
2 changed files with 26 additions and 0 deletions
15
Dockerfile.rpi
Normal file
15
Dockerfile.rpi
Normal file
|
@ -0,0 +1,15 @@
|
|||
FROM mielune/alpine-python3-arm
|
||||
MAINTAINER Martin <Munsio> Treml
|
||||
|
||||
WORKDIR /opt/app
|
||||
COPY ./configurator.py ./run.sh /opt/app/
|
||||
RUN chmod a+x ./configurator.py ./run.sh
|
||||
|
||||
# Default listening port.
|
||||
EXPOSE 8123
|
||||
|
||||
# The configuration yaml for persistance.
|
||||
VOLUME /config
|
||||
|
||||
ENTRYPOINT ["/opt/app/run.sh"]
|
||||
|
11
run.sh
Executable file
11
run.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
if [ ! -f /config/settings.conf ]; then
|
||||
echo "No configuration file found proceeding with default values"
|
||||
python3 /opt/app/configurator.py
|
||||
else
|
||||
echo "Configuration file found starting configurator with provided settings"
|
||||
python3 /opt/app/configurator.py /config/settings.conf
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue