Update Dockerfile
This commit is contained in:
parent
21e9c010e2
commit
7fb595bbda
1 changed files with 4 additions and 21 deletions
25
Dockerfile
25
Dockerfile
|
@ -2,11 +2,6 @@ FROM python:3.9
|
||||||
LABEL maintainer="neurocis <neurocis@neurocis.me>"
|
LABEL maintainer="neurocis <neurocis@neurocis.me>"
|
||||||
|
|
||||||
RUN true && \
|
RUN true && \
|
||||||
# Install package prerequisites
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -qy cron && \
|
|
||||||
apt-get clean && \
|
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
|
|
||||||
\
|
\
|
||||||
# Install GRPCurl
|
# Install GRPCurl
|
||||||
wget https://github.com/fullstorydev/grpcurl/releases/download/v1.8.0/grpcurl_1.8.0_linux_x86_64.tar.gz && \
|
wget https://github.com/fullstorydev/grpcurl/releases/download/v1.8.0/grpcurl_1.8.0_linux_x86_64.tar.gz && \
|
||||||
|
@ -23,20 +18,8 @@ ADD . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# run crond as main process of container
|
# run crond as main process of container
|
||||||
CMD true && \
|
ENTRYPOINT ["/bin/sh", "/app/entrypoint.sh"]
|
||||||
printenv >> /etc/environment && \
|
CMD ["dishStatusInflux.py"]
|
||||||
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
|
|
||||||
#ntpd -p pool.ntp.org && \
|
|
||||||
grpcurl -plaintext -protoset-out dish.protoset 192.168.100.1:9200 describe SpaceX.API.Device.Device && \
|
|
||||||
python3 -m grpc_tools.protoc --descriptor_set_in=dish.protoset --python_out=. --grpc_python_out=. spacex/api/device/device.proto && \
|
|
||||||
python3 -m grpc_tools.protoc --descriptor_set_in=dish.protoset --python_out=. --grpc_python_out=. spacex/api/common/status/status.proto && \
|
|
||||||
python3 -m grpc_tools.protoc --descriptor_set_in=dish.protoset --python_out=. --grpc_python_out=. spacex/api/device/command.proto && \
|
|
||||||
python3 -m grpc_tools.protoc --descriptor_set_in=dish.protoset --python_out=. --grpc_python_out=. spacex/api/device/common.proto && \
|
|
||||||
python3 -m grpc_tools.protoc --descriptor_set_in=dish.protoset --python_out=. --grpc_python_out=. spacex/api/device/dish.proto && \
|
|
||||||
python3 -m grpc_tools.protoc --descriptor_set_in=dish.protoset --python_out=. --grpc_python_out=. spacex/api/device/wifi.proto && \
|
|
||||||
python3 -m grpc_tools.protoc --descriptor_set_in=dish.protoset --python_out=. --grpc_python_out=. spacex/api/device/wifi_config.proto && \
|
|
||||||
echo "$CRON_ENTRY" | crontab - && cron -f
|
|
||||||
|
|
||||||
# docker run -d --name='starlink-grpc-tools' -e INFLUXDB_HOST=192.168.1.34 -e INFLUXDB_PORT=8086 -e INFLUXDB_DB=starlink
|
# docker run -d --name='starlink-grpc-tools' -e INFLUXDB_HOST=192.168.1.34 -e INFLUXDB_PORT=8086 -e INFLUXDB_DB=starlink
|
||||||
# -e "CRON_ENTRY=* * * * * /usr/local/bin/python3 /app/dishStatusInflux_cron.py > /proc/1/fd/1 2>/proc/1/fd/2"
|
# --net='br0' --ip='192.168.1.39' neurocis/starlink-grpc-tools dishStatusInflux.py
|
||||||
# --net='br0' --ip='192.168.1.39' neurocis/starlink-grpc-tools
|
|
||||||
|
|
Loading…
Reference in a new issue