Skip to content

Instantly share code, notes, and snippets.

@travis103
Last active December 24, 2019 07:45
Show Gist options
  • Save travis103/7eae9cca317fe5887a893f85724fdbc4 to your computer and use it in GitHub Desktop.
Save travis103/7eae9cca317fe5887a893f85724fdbc4 to your computer and use it in GitHub Desktop.
v2ray-install-on-ubuntu.sh
#!/bin/bash
timedatectl set-timezone Asia/Hong_Kong
apt update
apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
apt update
apt-cache policy docker-ce
apt install docker-ce -y
export DOCKER_COMPOSE_VERSION=`git ls-remote --tags git://github.com/docker/compose.git | awk '{print $2}' |grep -v "docs\|rc" |awk -F'/' '{print $3}' |sort -V |tail -n1`
mkdir -p /opt/bin/
curl -L https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose
rm -rf v2ray
git clone https://github.com/ushdjkfnf/v2ray
cd v2ray/
/opt/bin/docker-compose up -d
cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment