diff --git a/dev/ci/docker_linux/README.md b/dev/ci/docker_linux/README.md index 3aca335716..8775b83067 100644 --- a/dev/ci/docker_linux/README.md +++ b/dev/ci/docker_linux/README.md @@ -5,8 +5,11 @@ In order to run the scripts, you have to setup `docker` and `gcloud`. Please refer to the [internal flutter team doc](go/flutter-team) for how to setup in a Google internal environment. -After setup, -* edit `Dockerfile` to change how the container image is built. -* run `./docker_build.sh` to build the container image. -* run `./docker_push.sh` to push the image to google cloud registry. This will - affect our CI tests. +To debug the image locally: +* (Optional) edit the `Dockerfile` to change how the container image is built. +* Run `./docker_build.sh` to build the container image (`sudo` permission is + required) +* Run `./docker_attach.sh` to start a container from the image and attach to its + internal bash shell. From here, you can invoke shell commands from the + `.cirrus.yml` (you will have to manually run any `setup` steps; e.g. the + container will not have the Flutter repo cloned yet). diff --git a/dev/ci/docker_linux/docker_attach.sh b/dev/ci/docker_linux/docker_attach.sh new file mode 100755 index 0000000000..e68905904c --- /dev/null +++ b/dev/ci/docker_linux/docker_attach.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +TAG="${CIRRUS_TAG:-latest}" + +# Starts an interactive docker container with a bash shell running in it, and +# attaches the user's shell to it. +sudo docker run --interactive --tty \ + "gcr.io/flutter-cirrus/build-flutter-image:$TAG" \ + /bin/bash