From 29dba31b0ad8c4c4f245b1df16955b27ea76b2a7 Mon Sep 17 00:00:00 2001 From: JMARyA Date: Thu, 1 Aug 2024 10:43:19 +0200 Subject: [PATCH] init --- .forgejo/workflows/build.yml | 32 ++++++++++++++++++++++++++++++++ Dockerfile | 19 +++++++++++++++++++ README.md | 2 ++ 3 files changed, 53 insertions(+) create mode 100644 .forgejo/workflows/build.yml create mode 100644 Dockerfile create mode 100644 README.md diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..73dfb08 --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,32 @@ +name: build + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: host + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + registry: git.hydrar.de + username: ${{ secrets.registry_user }} + password: ${{ secrets.registry_password }} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: git.hydrar.de/hydra/flutter:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b02d18d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu:22.04 + +# Set up new user +RUN useradd -ms /bin/bash developer +USER developer +WORKDIR /home/developer + +# Install flutter dependencies +RUN apt-get update && apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback lib32stdc++6 python3 xz-utils zip libglu1-mesa openjdk-8-jdk && apt-get clean + +# Clone the flutter repo +RUN git clone https://github.com/flutter/flutter.git /home/developer/flutter +ENV PATH "$PATH:/home/developer/flutter/bin" + +# Enable flutter web +RUN flutter channel stable +RUN flutter config --enable-web +RUN flutter upgrade +RUN flutter doctor diff --git a/README.md b/README.md new file mode 100644 index 0000000..2aad79f --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Flutter +Flutter Build Container \ No newline at end of file