Skip to content

Commit 1bb6758

Browse files
authored
Merge pull request #170 from polycube-network/pr/use_golang_from_repo
use golang from repo
2 parents fad1477 + b5a15fc commit 1bb6758

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if [ "$MODE" = "pcn-k8s" ] ; then \
1919
GOOS=linux go build -o /pcn_k8s . ; \
2020
fi && \
2121
apt-get purge --auto-remove -y git bison cmake flex \
22-
libllvm5.0 llvm-5.0-dev libclang-5.0-dev uuid-dev autoconf \
22+
libllvm5.0 llvm-5.0-dev libclang-5.0-dev uuid-dev autoconf software-properties-common golang-go \
2323
libtool curl && \
2424
apt-get clean && \
2525
rm -fr /root /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/local/go/*

scripts/install.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,17 @@ $SUDO apt install -y wget gnupg2
6565

6666
echo "Install golang v1.12"
6767
# TODO: v1.12 still not available in repos
68-
wget https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz
69-
$SUDO tar -xvf go1.12.6.linux-amd64.tar.gz
70-
$SUDO mv go /usr/local
71-
$SUDO ln -s /usr/local/go/bin/go /usr/bin
68+
#wget https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz
69+
#$SUDO tar -xvf go1.12.6.linux-amd64.tar.gz
70+
#$SUDO mv go /usr/local
71+
#$SUDO ln -s /usr/local/go/bin/go /usr/bin
72+
73+
$SUDO apt-get install -y software-properties-common
74+
$SUDO add-apt-repository ppa:longsleep/golang-backports
75+
$SUDO apt-get update
76+
$SUDO apt install -y golang-go
77+
#$SUDO ln -s /usr/bin
78+
7279

7380
$SUDO sh -c "echo 'deb http://download.opensuse.org/repositories/home:/liberouter/xUbuntu_18.04/ /' > /etc/apt/sources.list.d/home:liberouter.list"
7481
wget -nv https://download.opensuse.org/repositories/home:liberouter/xUbuntu_18.04/Release.key -O Release.key

0 commit comments

Comments
 (0)