-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Dockerfile
47 lines (37 loc) · 1.49 KB
/
Dockerfile
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
39
40
41
42
43
44
45
46
47
FROM python:3.12-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
git \
make \
doxygen \
openssh-client \
software-properties-common \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*
ENV PAGEFIND_VERSION="1.1.0"
ARG TARGETARCH
SHELL ["/bin/bash", "-c"]
RUN <<EOF
export TARGETARCH=${TARGETARCH/arm64/aarch64}
export TARGETARCH=${TARGETARCH/amd64/x86_64}
curl -o pagefind.tar.gz https://github.com/CloudCannon/pagefind/releases/download/v$PAGEFIND_VERSION/pagefind-v$PAGEFIND_VERSION-$TARGETARCH-unknown-linux-musl.tar.gz -L
tar xzf pagefind.tar.gz
rm pagefind.tar.gz
mv pagefind /usr/bin
chmod +x /usr/bin/pagefind
EOF
RUN useradd -ms /bin/bash esphome
USER esphome
WORKDIR /workspaces/esphome-docs
ENV PATH="${PATH}:/home/esphome/.local/bin"
COPY requirements.txt ./
RUN pip3 install --no-cache-dir -r requirements.txt
EXPOSE 8000
CMD ["make", "live-html"]
LABEL \
org.opencontainers.image.title="esphome-docs" \
org.opencontainers.image.description="An image to help with ESPHomes documentation development" \
org.opencontainers.image.vendor="ESPHome" \
org.opencontainers.image.licenses="CC BY-NC-SA 4.0" \
org.opencontainers.image.url="https://esphome.io" \
org.opencontainers.image.source="https://github.com/esphome/esphome-docs" \
org.opencontainers.image.documentation="https://github.com/esphome/esphome-docs/blob/current/README.md"