Files
ofvp_Server/Dockerfile
T
Sirherobrine23andGitHub b85cbf60bd Refactoring Server (#4)
* start of refactoring

* Wireguard Init

* Update

* Config

* Ssh

* ShadowSockets

* Update Dockerfile

* Pull Request Actions

* Removed Dropbear And ssh Update

* Push

* Push

* Add

* to lower case files

* Rename Dirs

* Push

* vs code Dev Conatiner

* Update devcontainer
2021-10-06 13:01:32 -03:00

66 lines
2.7 KiB
Docker

# Copiler BadVPN
FROM ubuntu:latest AS badvpn
ENV DEBIAN_FRONTEND="noninteractive"
RUN apt update && apt -qq install --reinstall -y cmake make build-essential git pkg-config cmake-data
RUN git clone https://github.com/shadowsocks/badvpn.git /tmp/badvpn
RUN mkdir /tmp/build /tmp/output && cd /tmp/build/ && \
cmake /tmp/badvpn -DBUILD_NOTHING_BY_DEFAULT=1 -DBUILD_UDPGW=1 -DCMAKE_INSTALL_PREFIX=/tmp/output && \
make install
FROM rust:latest AS sockets
ENV DEBIAN_FRONTEND="noninteractive"
RUN apt update && apt install --reinstall -y build-essential git curl wget
WORKDIR /Build
RUN git clone --depth=1 --recursive https://github.com/shadowsocks/shadowsocks-rust.git ./
RUN cargo build --release
RUN make install TARGET=release
# Servers
FROM ubuntu:latest AS servers
ENV DEBIAN_FRONTEND="noninteractive" container="docker"
# 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
# Install nodeJS
RUN curl -fsSL https://deb.nodesource.com/setup_current.x | bash - && apt install -y nodejs
# Install squid, openssh and Remove Configs files
RUN apt update && apt install -y squid openssh-server procps openresolv inotify-tools gnupg libc6 libelf-dev perl pkg-config figlet python3 python3-pip && \
rm -fv /etc/ssh/sshd_config /etc/ssh/ssh_host_* /etc/squid*/squid.conf
# Change bash to zsh
RUN usermod --shell /usr/bin/zsh root
# 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 "linux-headers-generic" "linux-image-generic" "wireguard-tools" "iptables" "iproute2" "resolvconf" "qrencode" "dkms" "wireguard"
# Install badVPN
COPY --from=badvpn /tmp/output/bin/badvpn-udpgw /bin/badvpn-udpgw
# Install Shadowsocks
RUN apt install -y rng-tools musl
COPY --from=sockets /Build/target/release/* /usr/bin/
# Copy and Install Dependecies
WORKDIR /usr/src/Backend
# Expose ports and Envs
EXPOSE 22/tcp 80/tcp 7300/tcp 51820/udp 3000/tcp
# Copy
COPY package*.json ./
RUN npm install --no-save
COPY ./ ./
# Set Entrypoint
ENTRYPOINT [ "node", "--no-warnings", "index.js" ]
# Label
LABEL name = "OFVp Server" \
org.opencontainers.image.title = "OFVp Server" \
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." \
org.opencontainers.image.vendor = "Sirherobrine23" \
org.opencontainers.image.licenses = "mit" \
org.opencontainers.image.source = "https://github.com/OFVp-Project/Server"