58 lines
2.3 KiB
Docker
58 lines
2.3 KiB
Docker
# Servers
|
|
FROM ubuntu:latest AS servers
|
|
ENV DEBIAN_FRONTEND="noninteractive"
|
|
LABEL name="OFVp Server"
|
|
LABEL org.opencontainers.image.title="OFVp Server"
|
|
LABEL org.opencontainers.image.description="Start a server for Http Injector in the fastest and easiest way to maintain and update as new tools are released and your host does not need to restart with all new changes."
|
|
LABEL org.opencontainers.image.vendor="Sirherobrine23"
|
|
LABEL org.opencontainers.image.licenses="MIT"
|
|
LABEL org.opencontainers.image.source="https://github.com/OFVp-Project/Server.git"
|
|
|
|
# Ports
|
|
EXPOSE 22/tcp 80/tcp 7300/tcp 51820/udp 3000/tcp 8081/tcp
|
|
|
|
# Install Core Packages
|
|
RUN apt update && apt -y install build-essential wget curl git unzip zip zsh sudo jq screen nano ca-certificates net-tools bc lsof dos2unix nload zlib1g-dev ifupdown iputils-ping iproute2 tzdata openssl ntp procps openresolv inotify-tools gnupg libc6 libelf-dev perl pkg-config figlet python3 python python3-pip
|
|
|
|
# Build and install badvpn
|
|
WORKDIR /tmp/BadvpnCopile
|
|
RUN apt update && apt -qq install --reinstall -y cmake make build-essential git pkg-config cmake-data && \
|
|
git clone https://github.com/OFVp-Project/badvpn.git badvpn && \
|
|
mkdir build output && cd build/ && cmake ../badvpn -DBUILD_NOTHING_BY_DEFAULT=1 -DBUILD_UDPGW=1 -DCMAKE_INSTALL_PREFIX=/usr && make install && \
|
|
rm -rfv /tmp/BadvpnCopile/*
|
|
|
|
# Change bash to zsh
|
|
RUN usermod --shell /usr/bin/zsh root
|
|
|
|
# Install Openssh Server
|
|
RUN apt update && apt install -y openssh-server && \
|
|
rm -fv /etc/ssh/sshd_config /etc/ssh/ssh_host_*
|
|
|
|
# Install Wireguard
|
|
RUN apt-get -y install debconf-utils && \
|
|
echo resolvconf resolvconf/linkify-resolvconf boolean false | debconf-set-selections && \
|
|
apt-get -y install resolvconf && \
|
|
apt -y install wireguard-tools iptables iproute2 resolvconf qrencode dkms wireguard
|
|
|
|
# Install latest NodeJS
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && apt install -y nodejs && npm install -g npm@latest
|
|
|
|
# Copy and Install Dependecies
|
|
WORKDIR /usr/src/Backend
|
|
|
|
# Copy Backend Control
|
|
COPY package*.json ./
|
|
RUN npm install --no-save
|
|
COPY ./ ./
|
|
|
|
ENV \
|
|
Service_Squid="false" \
|
|
Service_Badvpn="true" \
|
|
Service_ssh="true" \
|
|
Service_WebProxy="true" \
|
|
Service_Wireguard="true" \
|
|
MongoDB_URL="mongodb://ofvp_mongodb:27017"
|
|
|
|
# Set Entrypoint
|
|
ENTRYPOINT [ "node", "--no-warnings", "src/index.js" ]
|