mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
c60613475c
This change moves all Docker images to a standard location, and abstracts the build process so that they can be maintained in an automated fashion. This also allows the images to be architecture-independent. All images will now be referred to by the test framework via the canonical `gvisor.dev/images/<name>`, where `<name>` is a function of the path within the source tree. In a subsequent change, continuous integration will be added so that the images will always be correct and available locally. In the end, using `bazel` for Docker containers is simply not possible. Given that we already have the need to use `make` with the base container (for Docker), we extend this approach to get more flexibility. This change also adds a self-documenting and powerful Makefile that is intended to replace the collection of scripts in scripts. Canonical (self-documenting) targets can be added here for targets that understand which images need to be loaded and/or built. PiperOrigin-RevId: 308322438
33 lines
1.2 KiB
Bash
Executable File
33 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Copyright 2019 The gVisor Authors.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
source $(dirname $0)/common.sh
|
|
|
|
make load-all-images
|
|
|
|
# Reinstall the latest containerd shim.
|
|
declare -r base="https://storage.googleapis.com/cri-containerd-staging/gvisor-containerd-shim"
|
|
declare -r latest=$(mktemp --tmpdir gvisor-containerd-shim-latest.XXXXXX)
|
|
declare -r shim_path=$(mktemp --tmpdir gvisor-containerd-shim.XXXXXX)
|
|
wget --no-verbose "${base}"/latest -O ${latest}
|
|
wget --no-verbose "${base}"/gvisor-containerd-shim-$(cat ${latest}) -O ${shim_path}
|
|
chmod +x ${shim_path}
|
|
sudo mv ${shim_path} /usr/local/bin/gvisor-containerd-shim
|
|
|
|
# Run the tests that require root.
|
|
install_runsc_for_test root
|
|
run_as_root //test/root:root_test --runtime=${RUNTIME}
|