forked from infinityofspace/jellyfin_alexa_skill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
47 lines (33 loc) · 1.22 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.10-alpine3.14 AS build-image
RUN apk add --no-cache \
gcc \
musl-dev \
libffi-dev \
openssl-dev \
cargo \
g++ \
git \
&& if [[ $(uname -m) == armv6* || $(uname -m) == armv7* ]]; then \
mkdir -p ~/.cargo/registry/index \
&& cd ~/.cargo/registry/index \
&& git clone --bare https://github.com/rust-lang/crates.io-index.git github.com-1285ae84e5963aae; \
fi
# workaround for cryptography arm build issue: see https://github.com/pyca/cryptography/issues/6673
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
WORKDIR /app
COPY requirements.txt .
RUN pip3 install --upgrade pip && pip3 install -r requirements.txt
COPY . .
RUN python3 setup.py install
FROM python:3.10-alpine3.14
COPY --from=build-image /opt/venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN apk add --no-cache binutils openssl-dev
RUN mkdir -p /skill/config \
&& mkdir -p /skill/data
ENV JELLYFIN_ALEXA_SKILL_CONFIG=/skill/config/skill.conf
ENV JELLYFIN_ALEXA_SKILL_DATA=/skill/data
ENTRYPOINT ["jellyfin_alexa_skill"]
LABEL org.opencontainers.image.source="https://github.com/infinityofspace/jellyfin_alexa_skill"
LABEL org.opencontainers.image.licenses="GPL-3.0"