mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 12:09:31 +00:00
bf4cad131d
reland note: Added wineboot for Dockerfile.user, since it prepares directories for wine on a per-user basis. To enable podman, the Dockerfile has been split into a root run Dockerfile and one that adds a non-root user. The following combinations have been tested: ./tools/dev_container -v --clean --podman --unprivileged ./tools/dev_container -v --clean --podman ./tools/dev_container -v --clean --unprivileged And warnings have been added to ensure users are aware that the only fully supported variant is running a privileged docker container: ./tools/dev_container -v --clean The unprivileged containers will allow us to validate if unit tests require privileged system access. BUG=None TEST=See above Change-Id: Ifd70c1e30ef266e39bf517e315dc88fccecc8a62 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3983255 Auto-Submit: Dennis Kempin <denniskempin@google.com> Reviewed-by: Zihan Chen <zihanchen@google.com> Commit-Queue: Zihan Chen <zihanchen@google.com>
45 lines
1.1 KiB
Makefile
45 lines
1.1 KiB
Makefile
# Copyright 2021 The ChromiumOS Authors
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
#
|
|
# To locally build the docker container for usage with dev_container:
|
|
#
|
|
# make -C tools/impl/dev_container crosvm_dev
|
|
#
|
|
# To upload a new version of the container, uprev the `version` file and run;
|
|
#
|
|
# make -C tools/impl/dev_container upload
|
|
#
|
|
# You need to be a Googler to be able to do so. See go/crosvm/infra for access control and
|
|
# authenticate via:
|
|
#
|
|
# gcloud auth configure-docker gcr.io
|
|
|
|
export DOCKER_BUILDKIT=1
|
|
|
|
TAG_BASE=gcr.io/crosvm-infra
|
|
VERSION=$(shell cat version)
|
|
BUILD_CONTEXT=$(shell realpath ../../../)
|
|
|
|
DOCKER ?= docker
|
|
|
|
all: crosvm_dev crosvm_dev_user
|
|
|
|
upload: all
|
|
$(DOCKER) push $(TAG_BASE)/crosvm_dev:$(VERSION)
|
|
$(DOCKER) push $(TAG_BASE)/crosvm_dev_user:$(VERSION)
|
|
|
|
crosvm_dev:
|
|
$(DOCKER) build \
|
|
-t $(TAG_BASE)/$@:$(VERSION) \
|
|
-f Dockerfile \
|
|
$(BUILD_CONTEXT)
|
|
|
|
crosvm_dev_user:
|
|
$(DOCKER) build \
|
|
-t $(TAG_BASE)/$@:$(VERSION) \
|
|
-f Dockerfile.user \
|
|
--build-arg=VERSION=$(VERSION) \
|
|
$(BUILD_CONTEXT)
|
|
|
|
.PHONY: all crosvm_dev upload
|