File: Dockerfile

package info (click to toggle)
python-aioesphomeapi 25.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 964 kB
  • sloc: python: 10,688; sh: 8; makefile: 4
file content (38 lines) | stat: -rw-r--r-- 1,190 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM python:3.10

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

RUN useradd -ms /bin/bash esphome

USER esphome

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"