Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/ubuntu20-user-wa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: ubuntu20-user-wa-docker-build

on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
branches:
- 'main'

env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}

jobs:

ubuntu-20-user-wa:
runs-on: ubuntu-latest
steps:

- name: Log in to ghcr.io
uses: redhat-actions/[email protected]
with:
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
registry: ${{ env.IMAGE_REGISTRY }}

- name: Checkout
uses: actions/checkout@v3

- uses: mr-smithers-excellent/docker-build-push@v5
name: Build & push Docker image
with:
image: meta-flutter/ubuntu-20-user-wa
tags: main
registry: ghcr.io
dockerfile: ubuntu-20-user-wa/Dockerfile
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions ubuntu-20-user-wa/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM ubuntu:20.04

ARG TZ=America/Los_Angeles
ENV DEBIAN_FRONTEND=noninteractive
ARG RUNNER_USER_UID=1001
ARG DOCKER_GROUP_GID=121

USER root

RUN apt-get update
RUN apt-get install -y locales openssh-client git git-core
RUN apt-get install -y sudo python3 python3-pip python3-git python3-virtualenv

# Runner user
RUN adduser --disabled-password --gecos '' -u $RUNNER_USER_UID dev \
&& groupadd docker --gid $DOCKER_GROUP_GID \
&& usermod -aG sudo dev \
&& usermod -aG docker dev \
&& echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \
&& echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers

RUN chown -R dev:dev /home/dev

RUN locale-gen en_US.UTF-8
ENV LANG=en_US.UTF-8

USER dev

WORKDIR /home/dev

#
# Install workspace automation
#
RUN git clone https://github.com/meta-flutter/workspace-automation.git
WORKDIR /home/dev/workspace-automation
ENV PREFER_LLVM=14
RUN ./flutter_workspace.py