Merge pull request #73 from sparky8512/docker-arm64

Add linux/arm64 docker image generation

This should address issue #72
This commit is contained in:
sparky8512 2022-11-19 12:18:33 -08:00 committed by GitHub
commit c97e6ad70e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 14 deletions

View file

@ -20,10 +20,18 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: 'arm64'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry - name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 uses: docker/login-action@v2
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
@ -31,14 +39,15 @@ jobs:
- name: Extract metadata (tags, labels) for Docker - name: Extract metadata (tags, labels) for Docker
id: meta id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 uses: docker/metadata-action@v3
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc uses: docker/build-push-action@v3
with: with:
context: . context: .
platforms: linux/amd64,linux/arm64
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}

View file

@ -5,21 +5,20 @@ RUN true && \
\ \
# Install python prerequisites # Install python prerequisites
pip3 install \ pip3 install \
grpcio==1.36.1 \ grpcio==1.50.0 six==1.16.0 \
paho-mqtt==1.5.1 \ influxdb==5.3.1 certifi==2022.9.24 charset-normalizer==2.1.1 idna==3.4 \
influxdb==5.3.1 python-dateutil==2.8.1 pytz==2021.1 requests==2.25.1 \ msgpack==1.0.4 python-dateutil==2.8.2 pytz==2022.6 requests==2.28.1 \
certifi==2020.12.5 chardet==4.0.0 idna==2.10 urllib3==1.26.4 \ urllib3==1.26.12 \
six==1.15.0 msgpack==1.0.2 \ influxdb-client==1.34.0 reactivex==4.0.4 \
influxdb_client==1.24.0 rx==3.2.0 \ paho-mqtt==1.6.1 \
yagrc==1.1.1 grpcio-reflection==1.36.1 protobuf==3.15.6 \ typing_extensions==4.4.0 \
typing-extensions==4.3.0 yagrc==1.1.1 grpcio-reflection==1.50.0 protobuf==4.21.9
ADD . /app ADD . /app
WORKDIR /app WORKDIR /app
# run crond as main process of container
ENTRYPOINT ["/bin/sh", "/app/entrypoint.sh"] ENTRYPOINT ["/bin/sh", "/app/entrypoint.sh"]
CMD ["dish_grpc_influx.py status alert_detail"] CMD ["dish_grpc_influx.py status alert_detail"]
# 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
# --net='br0' --ip='192.168.1.39' neurocis/starlink-grpc-tools dish_grpc_influx.py status alert_detail # --net='br0' --ip='192.168.1.39' ghcr.io/sparky8512/starlink-grpc-tools dish_grpc_influx.py status alert_detail