Skip to content

Commit

Permalink
Update docker image to match the LUCI and Framework images (flutter#2…
Browse files Browse the repository at this point in the history
…5009)

* Test docker image update.

Do not review.

* Test build in a VM.

* Add project name.

* Update image type.

* Add apt-get dependencies.

* Update dependencies.

* Update gcloud packages installation.

* Update dockerfile.

* Fix errors in dockerfile.

* Fix dockerfile.

* Organize docker file to make it more readable.
  • Loading branch information
godofredoc authored Mar 18, 2021
1 parent 2ffb83e commit de59c6f
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 16 deletions.
1 change: 1 addition & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ task:
gke_container:
dockerfile: "ci/docker/build/Dockerfile"
builder_image_name: docker-builder # gce vm image
builder_image_project: flutter-cirrus
cluster_name: build-32-cluster
zone: us-central1-a
namespace: default
Expand Down
110 changes: 94 additions & 16 deletions ci/docker/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM debian:stretch

ENV DEPOT_TOOLS_PATH $HOME/depot_tools
ENV BUILDROOT_PATH $HOME/buildroot
Expand All @@ -8,19 +8,97 @@ ENV PATH $PATH:$DEPOT_TOOLS_PATH
# Notes:
# - libx11-dev is used by Flutter for desktop linux (see also install-build-deps-linux-desktop.sh)
# - chrome is used by Flutter for web.
RUN apt-get update && \
apt-get install -y git wget curl unzip python lsb-release sudo apt-transport-https && \
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $DEPOT_TOOLS_PATH && \
mkdir --parents $ENGINE_PATH && \
git clone https://github.com/flutter/buildroot.git $BUILDROOT_PATH && \
cd $BUILDROOT_PATH && \
./build/install-build-deps.sh --no-prompt && \
./build/install-build-deps-android.sh --no-prompt && \
(echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list) && \
(curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -) && \
(wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -) && \
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | tee /etc/apt/sources.list.d/google-chrome.list && \
apt-get update && apt-get install -y google-cloud-sdk google-chrome-stable libx11-dev && \

# Updates the distribution.
RUN apt-get update

# Install generic tools.
RUN apt-get install -y ca-certificates gnupg wget curl lsb-release sudo apt-transport-https

# Add additional repos.
# chrome stable
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | tee /etc/apt/sources.list.d/google-chrome.list
# gcloud sdk
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | \
tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
RUN apt-get update

# Install basic tools and libraries
RUN apt-get install -y \
acpica-tools \
autoconf \
automake \
bison \
build-essential \
dejagnu \
dosfstools \
flex \
g++-multilib \
gettext \
git \
gperf \
groff \
ifupdown \
libblkid-dev \
libc6-dev-i386 \
libedit-dev \
libfreetype6-dev \
libglib2.0-dev \
liblz4-tool \
libncurses5-dev \
libssl-dev \
libtool \
libxcursor-dev \
libxinerama-dev \
libxrandr-dev \
libxxf86vm-dev \
lsof \
mtools \
nasm \
net-tools \
openjdk-8-jdk \
pkg-config \
python \
python-m2crypto \
python2.7-dev \
tcpdump \
texinfo \
unzip \
uuid-dev \
vim \
xz-utils \
zip \
zlib1g-dev

# Install x/gui deps
RUN apt-get install -y \
libegl1-mesa \
libgles2-mesa-dev \
libglu1-mesa-dev \
libgtk-3-dev \
libx11-dev \
mesa-common-dev \
xvfb

# Install browsers
RUN apt-get install -y \
firefox-esr \
google-chrome-stable

# Install and config gcloud
RUN apt-get update && apt-get install -y google-cloud-sdk && \
gcloud config set core/disable_usage_reporting true && \
gcloud config set component_manager/disable_update_check true && \
apt-get clean
gcloud config set component_manager/disable_update_check true

# Clone depot_tools
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $DEPOT_TOOLS_PATH

# Clone buildroot
RUN git clone https://github.com/flutter/buildroot.git $BUILDROOT_PATH

# Make engine path and start change directory to buildroot.
RUN mkdir --parents $ENGINE_PATH && \
cd $BUILDROOT_PATH

0 comments on commit de59c6f

Please sign in to comment.