blob: c84b1709196d50508ae6f58b1acaa8dd2ad0cc64 [file] [log] [blame]
# Copyright 2019 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# This runs on the Debian Stretch template VM to turn it into the
# buildlet image we want. This isn't for running on the developer's
# host machine.
set -e
set -x
apt-get update
apt-get install --yes apt-transport-https ca-certificates curl gnupg2 software-properties-common
curl -fsSL | apt-key add -
add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"
apt-get update
apt-get install --yes docker-ce docker-ce-cli
git clone
mkdir -p /usr/share/google
install konlet/scripts/get_metadata_value /usr/share/google
mkdir -p /usr/share/gce-containers
install konlet/scripts/konlet-startup /usr/share/gce-containers/konlet-startup
install konlet/scripts/konlet-startup.service /etc/systemd/system
chmod -x /etc/systemd/system/konlet-startup.service
systemctl enable /etc/systemd/system/konlet-startup.service
systemctl start konlet-startup
# Pre-pull some common images/layers to speed up future boots:
gcloud auth configure-docker --quiet
docker pull
docker pull
apt-get dist-upgrade --yes