2022-07-10 17:02:08 +08:00
|
|
|
FROM ubuntu:22.04
|
2018-11-04 00:15:07 +08:00
|
|
|
|
2021-11-21 16:53:18 +08:00
|
|
|
LABEL org.oi-wiki.image.authors="frank99-xu@outlook.com mxr612@icloud.com coelacanthus@outlook.com"
|
2018-11-04 00:15:07 +08:00
|
|
|
|
2022-08-10 18:54:31 +08:00
|
|
|
ARG WIKI_REPO PYPI_MIRROR LISTEN_IP LISTEN_PORT
|
|
|
|
ENV LISTEN_IP=${LISTEN_IP:-0.0.0.0}
|
|
|
|
ENV LISTEN_PORT=${LISTEN_PORT:-8000}
|
|
|
|
|
2018-11-04 00:15:07 +08:00
|
|
|
WORKDIR /
|
|
|
|
RUN apt-get update \
|
2022-07-10 17:02:08 +08:00
|
|
|
&& apt-get install -y git wget curl pipenv gcc g++ make \
|
2022-07-10 16:35:32 +08:00
|
|
|
&& curl -sL https://deb.nodesource.com/setup_18.x | bash - \
|
2018-11-04 00:15:07 +08:00
|
|
|
&& apt-get install -y nodejs
|
|
|
|
|
2021-11-21 16:53:18 +08:00
|
|
|
# If you can't connect to GitHub, set WIKI_REPO to any mirror repo.
|
|
|
|
RUN git clone ${WIKI_REPO:-https://github.com/OI-wiki/OI-wiki.git} --depth=1 \
|
2018-11-04 00:15:07 +08:00
|
|
|
&& cd OI-wiki \
|
2022-07-10 17:02:08 +08:00
|
|
|
&& pipenv install --pypi-mirror ${PYPI_MIRROR:-https://pypi.org/simple/} \
|
2022-07-10 16:35:32 +08:00
|
|
|
&& yarn --frozen-lockfile
|
2018-11-04 00:15:07 +08:00
|
|
|
|
|
|
|
ADD .bashrc /root/
|
|
|
|
|
|
|
|
WORKDIR /OI-wiki
|
2022-08-10 18:54:31 +08:00
|
|
|
EXPOSE ${LISTEN_PORT}
|
2018-11-04 00:15:07 +08:00
|
|
|
CMD ["/bin/bash"]
|