|
FROM node:19.1.0-alpine3.16 |
|
|
|
|
|
ARG APP_HOME=/home/node/app |
|
|
|
|
|
RUN apk add gcompat tini git jq curl |
|
|
|
|
|
ENTRYPOINT [ "tini", "--" ] |
|
|
|
|
|
WORKDIR ${APP_HOME} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ENV fetch "" |
|
|
|
ENV reverse_proxy "" |
|
|
|
ENV proxy_password "" |
|
|
|
ENV api_key_makersuite "" |
|
|
|
ENV github_secret "" |
|
|
|
ENV github_project "" |
|
|
|
|
|
|
|
RUN git clone https://github.com/SillyTavern/SillyTavern.git --branch 1.12.1 . |
|
RUN \ |
|
echo "*** Install npm packages ***" && \ |
|
npm install && npm cache clean --force |
|
|
|
|
|
|
|
|
|
ADD launch.sh launch.sh |
|
RUN curl -JLO https://github.com/bincooo/SillyTavern-Docker/releases/download/v1.0.0/git-batch |
|
RUN chmod +x launch.sh && chmod +x git-batch && ./git-batch -h |
|
|
|
|
|
RUN \ |
|
echo "*** Cleanup ***" && \ |
|
mv "./docker/docker-entrypoint.sh" "./" && \ |
|
rm -rf "./docker" && \ |
|
echo "*** Make docker-entrypoint.sh executable ***" && \ |
|
chmod +x "./docker-entrypoint.sh" && \ |
|
echo "*** Convert line endings to Unix format ***" && \ |
|
dos2unix "./docker-entrypoint.sh" |
|
RUN sed -i 's/# Start the server/.\/launch.sh env \&\& .\/launch.sh init/g' docker-entrypoint.sh |
|
RUN chmod -R 777 ${APP_HOME} |
|
|
|
EXPOSE 8000 |
|
|
|
CMD [ "./docker-entrypoint.sh" ] |
|
|