mirror of
https://github.com/chubin/cheat.sh.git
synced 2024-11-23 02:25:53 +03:00
96cc3f64bd
File "/app/lib/globals.py", line 25, in error if not text.startswith("Too many queries"): TypeError: startswith first arg must be bytes or a tuple of bytes, not str
20 lines
654 B
Docker
20 lines
654 B
Docker
FROM alpine:3.12
|
|
# fetching cheat sheets
|
|
## installing dependencies
|
|
RUN apk add --update --no-cache git py3-six py3-pygments py3-yaml py3-gevent \
|
|
libstdc++ py3-colorama py3-requests py3-icu py3-redis
|
|
## building missing python packages
|
|
RUN apk add --no-cache --virtual build-deps py3-pip g++ python3-dev \
|
|
&& pip3 install --no-cache-dir rapidfuzz colored polyglot pycld2 \
|
|
&& apk del build-deps
|
|
## copying
|
|
WORKDIR /app
|
|
COPY . /app
|
|
RUN mkdir -p /root/.cheat.sh/log/ \
|
|
&& python3 lib/fetch.py fetch-all
|
|
|
|
# installing server dependencies
|
|
RUN apk add --update --no-cache py3-jinja2 py3-flask bash
|
|
ENTRYPOINT ["python3"]
|
|
CMD ["bin/srv.py"]
|