Skip to content

Commit

Permalink
Merge pull request #4232 from fahedouch/install_runc_with_gosu
Browse files Browse the repository at this point in the history
[ci] install runc with gosu
  • Loading branch information
crosbymichael committed May 7, 2020
2 parents 80859e8 + 24b331a commit 35ffd23
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -269,6 +269,16 @@ jobs:
with:
go-version: '1.13.10'

- name: Setup gosu
shell: bash
run: |
GOSU=/usr/local/bin/gosu
arch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"
sudo wget -O ${GOSU} "https://github.com/tianon/gosu/releases/download/1.12/gosu-$arch"
sudo chmod +x ${GOSU}
sudo chown root ${GOSU}
sudo chmod +s ${GOSU}
- name: Set env
shell: bash
run: |
Expand All @@ -285,7 +295,7 @@ jobs:
RUNC_FLAVOR: ${{ matrix.runc }}
run: |
sudo PATH=$PATH script/setup/install-seccomp
script/setup/install-runc
gosu root script/setup/install-runc
script/setup/install-cni
script/setup/install-critools
working-directory: src/github.com/containerd/containerd
Expand Down
8 changes: 4 additions & 4 deletions script/setup/install-runc
Expand Up @@ -27,13 +27,13 @@ function install_runc() {
cd "$GOPATH"/src/github.com/opencontainers/runc
git checkout $RUNC_COMMIT
make BUILDTAGS='apparmor seccomp selinux' runc
sudo make install
make install
}

function install_crun() {
CRUN_VERSION=0.11
sudo curl -o /usr/local/sbin/runc -L https://github.com/containers/crun/releases/download/${CRUN_VERSION}/crun-${CRUN_VERSION}-static-$(uname -m)
sudo chmod +x /usr/local/sbin/runc
curl -o /usr/local/sbin/runc -L https://github.com/containers/crun/releases/download/${CRUN_VERSION}/crun-${CRUN_VERSION}-static-$(uname -m)
chmod +x /usr/local/sbin/runc
}

: ${RUNC_FLAVOR=runc}
Expand All @@ -44,4 +44,4 @@ crun) install_crun ;;
echo >&2 "unknown runc flavor: ${RUNC_FLAVOR}"
exit 1
;;
esac
esac

0 comments on commit 35ffd23

Please sign in to comment.