Skip to content

Commit 6e15035

Browse files
Merge pull request #102 from Roblox/nerdctl
Add nerdctl to vagrant VM.
2 parents 18db886 + 496e2d3 commit 6e15035

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ will launch the job.<br/>
7777

7878
More detailed instructions are in the [`example README.md`](https://github.com/Roblox/nomad-driver-containerd/tree/master/example)
7979

80+
To interact with `images` and `containers` directly, you can use [`nerdctl`](https://github.com/containerd/nerdctl) which is a docker compatible CLI for `containerd`. `nerdctl` is already installed in the vagrant VM at `/usr/local/bin`.
81+
8082
## Supported options
8183

8284
**Driver Config**

Vagrantfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Vagrant.configure("2") do |config|
2323
apt-get install -y unzip gcc runc jq
2424
echo "export GOPATH=/home/vagrant/go" >> /home/vagrant/.bashrc
2525
echo "export PATH=$PATH:/usr/local/go/bin" >> /home/vagrant/.bashrc
26+
echo "export CONTAINERD_NAMESPACE=nomad" >> /home/vagrant/.bashrc
2627
source /home/vagrant/.bashrc
2728
# without keeping HOME env, 'sudo make test' will try to find files under /root/go/
2829
echo "Defaults env_keep += HOME" | sudo tee /etc/sudoers.d/keep_home
@@ -50,6 +51,13 @@ Vagrant.configure("2") do |config|
5051
rm -f containerd-1.3.4.linux-amd64.tar.gz
5152
fi
5253
54+
# Install nerdctl 0.10.0
55+
if [ ! -f "/usr/local/bin/nerdctl" ]; then
56+
curl -L --silent -o nerdctl-0.10.0-linux-amd64.tar.gz https://github.com/containerd/nerdctl/releases/download/v0.10.0/nerdctl-0.10.0-linux-amd64.tar.gz
57+
tar -C /usr/local/bin -xzf nerdctl-0.10.0-linux-amd64.tar.gz
58+
rm -f nerdctl-0.10.0-linux-amd64.tar.gz
59+
fi
60+
5361
# Create source directory for privileged.nomad example job.
5462
mkdir -p /tmp/s1
5563

0 commit comments

Comments
 (0)