blob: 55c196d2f73621af83fef8366b7da15c4e9a26fb (
plain)
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
|
FROM alpine:3.14.0
LABEL MAINTAINER="heckyel@riseup.net"
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
RUN apk add --no-cache musl-dev build-base gcc libffi-dev python3-dev patch git py3-pip tor curl
ARG APP_DIR="/srv/app"
ARG YT_REPO="https://git.sr.ht/~heckyel/yt-local"
ARG YT_BRANCH="master"
RUN mkdir --parents "$APP_DIR"
WORKDIR "$APP_DIR"
RUN git clone --depth=1 "$YT_REPO" --branch "$YT_BRANCH" "$APP_DIR"
RUN git show --oneline --no-patch
RUN pip3 install -r requirements.txt
COPY 0001.patch "$APP_DIR/0001.patch"
RUN patch -Np1 -i "$APP_DIR/0001.patch"
# clean
RUN rm -f "$APP_DIR/0001.patch"
RUN apk del build-base patch python3-dev
EXPOSE 8080
COPY entrypoint-tor.sh /
COPY entrypoint.sh /
RUN chmod u+x /entrypoint-tor.sh
RUN chmod u+x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
|