2021-10-21 16:53:32 +02:00
|
|
|
FROM python:3.10
|
2021-07-22 01:35:08 +02:00
|
|
|
|
2022-11-22 19:20:23 +01:00
|
|
|
ENV PROTOC_VERSION 3.19.6
|
|
|
|
|
|
|
|
ARG TARGETARCH
|
|
|
|
|
|
|
|
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
|
|
|
arch="x86_64"; \
|
|
|
|
elif [ "$TARGETARCH" = "arm64" ]; then \
|
|
|
|
arch="aarch_64"; \
|
|
|
|
else \
|
|
|
|
exit 1; \
|
|
|
|
fi \
|
|
|
|
&& curl -o /tmp/protoc.zip -L \
|
|
|
|
https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${arch}.zip \
|
|
|
|
&& unzip /tmp/protoc.zip -d /usr -x readme.txt \
|
|
|
|
&& rm /tmp/protoc.zip
|
2021-07-22 01:35:08 +02:00
|
|
|
|
|
|
|
WORKDIR /aioesphomeapi
|
|
|
|
|
|
|
|
COPY requirements_test.txt ./
|
|
|
|
|
|
|
|
RUN pip3 install -r requirements_test.txt
|
|
|
|
|
|
|
|
CMD ["script/gen-protoc"]
|
|
|
|
|
|
|
|
LABEL \
|
|
|
|
org.opencontainers.image.title="aioesphomeapi protobuf generator" \
|
|
|
|
org.opencontainers.image.description="An image to help with ESPHomes aioesphomeapi protobuf generation" \
|
|
|
|
org.opencontainers.image.vendor="ESPHome" \
|
|
|
|
org.opencontainers.image.licenses="MIT" \
|
|
|
|
org.opencontainers.image.url="https://esphome.io" \
|
|
|
|
org.opencontainers.image.source="https://github.com/esphome/aioesphomeapi" \
|
|
|
|
org.opencontainers.image.documentation="https://github.com/esphome/aioesphomeapi/blob/main/README.md"
|