Merge pull request #6384 from reitermarkus/docker

Try caching the Docker image.
This commit is contained in:
Markus Reiter 2019-08-21 09:59:09 +02:00 committed by GitHub
commit 94233cf4e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 28 deletions

View File

@ -23,7 +23,9 @@ jobs:
if: matrix.os == 'macOS-latest' if: matrix.os == 'macOS-latest'
- name: Build Docker image - name: Build Docker image
run: docker-compose -f Dockerfile.yml build sut run: |
docker pull linuxbrew/brew
docker-compose -f Dockerfile.yml build sut
if: matrix.os == 'ubuntu-latest' if: matrix.os == 'ubuntu-latest'
- name: Run brew test-bot - name: Run brew test-bot

View File

@ -26,6 +26,7 @@ RUN localedef -i en_US -f UTF-8 en_US.UTF-8 \
&& useradd -m -s /bin/bash linuxbrew \ && useradd -m -s /bin/bash linuxbrew \
&& echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers && echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers
ADD . /home/linuxbrew/.linuxbrew/Homebrew ADD . /home/linuxbrew/.linuxbrew/Homebrew
ARG FORCE_REBUILD
RUN cd /home/linuxbrew/.linuxbrew \ RUN cd /home/linuxbrew/.linuxbrew \
&& mkdir -p bin etc include lib opt sbin share var/homebrew/linked Cellar \ && mkdir -p bin etc include lib opt sbin share var/homebrew/linked Cellar \
&& ln -s ../Homebrew/bin/brew /home/linuxbrew/.linuxbrew/bin/ \ && ln -s ../Homebrew/bin/brew /home/linuxbrew/.linuxbrew/bin/ \

View File

@ -1,5 +1,13 @@
sut: version: '3.7'
build: .
services:
sut:
build:
context: .
cache_from:
- linuxbrew/brew
args:
- FORCE_REBUILD=1
command: command:
- sh - sh
- -xc - -xc