Shinobi/Dockerfile

112 lines
2.9 KiB
Docker
Raw Normal View History

FROM node:16.13-buster-slim
2020-08-25 23:32:42 +00:00
ENV DB_USER=majesticflame \
DB_PASSWORD='' \
DB_HOST='localhost' \
DB_DATABASE=ccio \
DB_PORT=3306 \
2020-08-25 23:32:42 +00:00
SUBSCRIPTION_ID=sub_XXXXXXXXXXXX \
2020-08-28 22:29:55 +00:00
PLUGIN_KEYS='{}' \
2020-08-31 07:37:21 +00:00
SSL_ENABLED='false' \
SSL_COUNTRY='CA' \
SSL_STATE='BC' \
SSL_LOCATION='Vancouver' \
SSL_ORGANIZATION='Shinobi Systems' \
SSL_ORGANIZATION_UNIT='IT Department' \
SSL_COMMON_NAME='nvr.ninja' \
2020-08-25 23:32:42 +00:00
DB_DISABLE_INCLUDED=false
ARG DEBIAN_FRONTEND=noninteractive
RUN mkdir -p /home/Shinobi /config /var/lib/mysql
RUN apt update -y
RUN apt install wget curl net-tools -y
# Install MariaDB server... the debian way
2020-08-28 22:29:55 +00:00
RUN if [ "$DB_DISABLE_INCLUDED" = "false" ] ; then set -ex; \
{ \
echo "mariadb-server" mysql-server/root_password password '${DB_ROOT_PASSWORD}'; \
echo "mariadb-server" mysql-server/root_password_again password '${DB_ROOT_PASSWORD}'; \
} | debconf-set-selections; \
apt-get update; \
apt-get install -y \
"mariadb-server" \
socat \
; \
find /etc/mysql/ -name '*.cnf' -print0 \
| xargs -0 grep -lZE '^(bind-address|log)' \
2020-08-28 22:29:55 +00:00
| xargs -rt -0 sed -Ei 's/^(bind-address|log)/#&/'; fi
2020-08-28 22:29:55 +00:00
RUN if [ "$DB_DISABLE_INCLUDED" = "false" ] ; then sed -ie "s/^bind-address\s*=\s*127\.0\.0\.1$/#bind-address = 0.0.0.0/" /etc/mysql/my.cnf; fi
# Install FFmpeg
2021-01-14 15:08:25 +00:00
RUN apt update --fix-missing
RUN apt install -y software-properties-common \
libfreetype6-dev \
libgnutls28-dev \
libmp3lame-dev \
libass-dev \
libogg-dev \
libtheora-dev \
libvorbis-dev \
libvpx-dev \
libwebp-dev \
libssh2-1-dev \
libopus-dev \
librtmp-dev \
libx264-dev \
libx265-dev \
2021-01-14 15:08:12 +00:00
yasm
RUN apt install -y \
build-essential \
bzip2 \
coreutils \
2021-01-08 01:19:32 +00:00
procps \
gnutls-bin \
nasm \
tar \
x264
RUN apt install -y \
ffmpeg \
git \
make \
g++ \
gcc \
pkg-config \
python3 \
wget \
tar \
sudo \
xz-utils
WORKDIR /home/Shinobi
COPY . .
2020-10-31 05:11:36 +00:00
#RUN rm -rf /home/Shinobi/plugins
2020-08-25 23:32:42 +00:00
COPY ./plugins /home/Shinobi/plugins
RUN chmod -R 777 /home/Shinobi/plugins
RUN npm i npm@latest -g && \
2021-06-11 04:21:59 +00:00
npm install --unsafe-perm && \
npm install pm2 -g
COPY ./Docker/pm2.yml ./
# Copy default configuration files
# COPY ./config/conf.json ./config/super.json /home/Shinobi/
RUN chmod -f +x /home/Shinobi/Docker/init.sh
2021-06-11 04:21:59 +00:00
RUN sed -i -e 's/\r//g' /home/Shinobi/Docker/init.sh
# RUN chmod -f +x /home/Shinobi/shinobi
VOLUME ["/home/Shinobi/videos"]
VOLUME ["/home/Shinobi/plugins"]
2021-11-05 19:34:50 +00:00
VOLUME ["/home/Shinobi/libs/customAutoLoad"]
VOLUME ["/config"]
VOLUME ["/var/lib/mysql"]
2021-06-23 23:37:57 +00:00
EXPOSE 8080 443 21 25
2021-06-11 04:21:59 +00:00
ENTRYPOINT ["sh","/home/Shinobi/Docker/init.sh"]
CMD [ "pm2-docker", "/home/Shinobi/Docker/pm2.yml" ]