2020-07-28 20:25:30 +03:00
|
|
|
FROM alpine:3.12
|
2020-07-27 21:06:14 +03:00
|
|
|
# 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
|
2020-11-13 20:39:50 +03:00
|
|
|
COPY requirements.txt /tmp
|
2020-11-13 22:02:43 +03:00
|
|
|
RUN apk add --no-cache --virtual build-deps py3-pip g++ python3-dev libffi-dev \
|
|
|
|
&& pip3 install --no-cache-dir --upgrade pygments \
|
|
|
|
&& pip3 install --no-cache-dir -r /tmp/requirements.txt \
|
2018-07-31 20:54:14 +03:00
|
|
|
&& apk del build-deps
|
2020-07-27 21:06:14 +03:00
|
|
|
## copying
|
|
|
|
WORKDIR /app
|
2020-07-27 09:14:22 +03:00
|
|
|
COPY . /app
|
2020-11-13 20:21:28 +03:00
|
|
|
RUN mkdir -p /root/.cheat.sh/log/ \
|
2020-07-27 21:06:14 +03:00
|
|
|
&& python3 lib/fetch.py fetch-all
|
|
|
|
|
|
|
|
# installing server dependencies
|
2020-07-29 14:15:36 +03:00
|
|
|
RUN apk add --update --no-cache py3-jinja2 py3-flask bash gawk
|
2020-07-31 13:31:31 +03:00
|
|
|
ENTRYPOINT ["python3", "-u", "bin/srv.py"]
|
|
|
|
CMD [""]
|