2021-11-12 23:14:42 +00:00
|
|
|
FROM alpine:3.14
|
2020-07-27 18:06:14 +00:00
|
|
|
# fetching cheat sheets
|
|
|
|
## installing dependencies
|
|
|
|
RUN apk add --update --no-cache git py3-six py3-pygments py3-yaml py3-gevent \
|
2021-11-16 09:57:14 +00:00
|
|
|
libstdc++ py3-colorama py3-requests py3-icu py3-redis sed
|
2020-11-16 23:03:42 +00:00
|
|
|
## copying
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . /app
|
2020-07-27 18:06:14 +00:00
|
|
|
## building missing python packages
|
2020-11-13 19:02:43 +00:00
|
|
|
RUN apk add --no-cache --virtual build-deps py3-pip g++ python3-dev libffi-dev \
|
|
|
|
&& pip3 install --no-cache-dir --upgrade pygments \
|
2020-11-16 23:03:42 +00:00
|
|
|
&& pip3 install --no-cache-dir -r requirements.txt \
|
2018-07-31 17:54:14 +00:00
|
|
|
&& apk del build-deps
|
2020-11-16 23:03:42 +00:00
|
|
|
# fetching dependencies
|
2020-11-13 17:21:28 +00:00
|
|
|
RUN mkdir -p /root/.cheat.sh/log/ \
|
2020-07-27 18:06:14 +00:00
|
|
|
&& python3 lib/fetch.py fetch-all
|
|
|
|
|
|
|
|
# installing server dependencies
|
2020-07-29 11:15:36 +00:00
|
|
|
RUN apk add --update --no-cache py3-jinja2 py3-flask bash gawk
|
2020-07-31 10:31:31 +00:00
|
|
|
ENTRYPOINT ["python3", "-u", "bin/srv.py"]
|
|
|
|
CMD [""]
|