diff options
author | Neil Fuller <nfuller@google.com> | 2020-04-16 14:01:10 +0100 |
---|---|---|
committer | Neil Fuller <nfuller@google.com> | 2021-06-14 15:23:37 +0000 |
commit | 4fd94cfcf97abc6cb75f49359aba4b2ec01e8b1e (patch) | |
tree | 99024a2bbbd3b3b16d007ab57ebf8052f0d49956 /android/tools/host/run_process_in_docker.sh | |
parent | a742137af6b180c09cccaa37ab793c6715d38f03 (diff) | |
download | timezone-boundary-builder-4fd94cfcf97abc6cb75f49359aba4b2ec01e8b1e.tar.gz |
Android additions to timezone-boundary-builder
Android additions to timezone-boundary-builder to assist with the data
generation process execution.
Addition of some Docker infra to improve repeatability of execution
(not improve security). Also a README.md to explain the process.
Note: Use --skip_analyze_diffs for run_tzdb.sh as the analysis doesn't
work well with --dist_dir. Upstream fix to follow.
Bug: 190733142
Test: Manual testing
Change-Id: I7b6d54e8dc56a03444d4b71fe3891384a87ce2d6
Diffstat (limited to 'android/tools/host/run_process_in_docker.sh')
-rwxr-xr-x | android/tools/host/run_process_in_docker.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/android/tools/host/run_process_in_docker.sh b/android/tools/host/run_process_in_docker.sh new file mode 100755 index 0000000..bdb615a --- /dev/null +++ b/android/tools/host/run_process_in_docker.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Copyright 2021 The Android Open Source Project +# +# 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. + +HOST_TOOLS_DIR=$(realpath $(dirname $0)) +CONTAINER_TOOLS_DIR=$(realpath $HOST_TOOLS_DIR/../container) +TZBB_ROOT=$(realpath $HOST_TOOLS_DIR/../../..) + +DOCKER_USERNAME=$(id -un) +DOCKER_UID=$(id -u) +DOCKER_GID=$(id -g) + +echo "This may need your sudo password in order to access docker:" +set -x +sudo docker build --build-arg userid=$DOCKER_UID --build-arg groupid=$DOCKER_GID --build-arg username=$DOCKER_USERNAME --build-arg tzbbroot=$TZBB_ROOT -t android-tzbb . +sudo docker run -it --rm -v $TZBB_ROOT:/timezone-boundary-builder android-tzbb $* +set +x + |