cheat.sh/Dockerfile
Anatoli Babenia 10bfaab38c Modern DevOps is a PITA
Run Python 3 in unbuffered mode to see lines in `docker logs` as
soon as they appear. When Python 3 is not attached to a terminal,
it turns on the buffering, like when `docker` runs in a background.
2020-07-31 13:31:31 +03:00

19 lines
669 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 gawk
ENTRYPOINT ["python3", "-u", "bin/srv.py"]
CMD [""]