Va medianamente con podman, no consigo que se creeen muchos containers

This commit is contained in:
Álvaro González 2026-01-09 09:28:28 +01:00
parent 4a42dc49d9
commit a0d9a34182
6 changed files with 39 additions and 26 deletions

View file

@ -1,18 +1,23 @@
# Use the official Flutter SDK image
FROM cirrusci/flutter:latest
FROM ghcr.io/cirruslabs/flutter:stable
# Install cmake, ninja, clang, pkg-config for flutter linux
RUN apt-get update && apt-get install -y cmake ninja-build clang pkg-config libgtk-3-dev liblzma-dev
# Set the working directory
WORKDIR /app
# Copy the pubspec.yaml and install dependencies
# Configure cache directories
ENV PUB_CACHE=/cache/pub-cache
ENV GRADLE_USER_HOME=/cache/gradle-cache
RUN mkdir -p $PUB_CACHE $GRADLE_USER_HOME
# Copy pubspec files and get dependencies
# This step is separated to leverage Docker layer caching
# REMEMBER: buld application with Makefile, it builds docker image first
COPY pubspec.yaml pubspec.lock ./
RUN flutter pub get
# Copy the rest of the application code
COPY . .
# Build the Flutter app for Android
RUN flutter build apk --release
# Use the following entrypoint if you want to run the app in a container
# ENTRYPOINT ["flutter", "run", "--release"]
# Copy the rest of the application code and build
# Commented out to avoid building the app during image creation, this will be handled externally by makefile
# COPY . .
# RUN flutter build apk --release

19
Makefile Normal file
View file

@ -0,0 +1,19 @@
build-podman:
podman-compose build
clean-podman: build-podman
podman-compose run --entrypoint "flutter clean" flutter
build-android-release-podman: build-podman
podman-compose run --entrypoint "flutter build apk --release" flutter
build-linux-debug-podman: build-podman
podman-compose run --entrypoint "flutter build linux" flutter
run-linux-debug: build-linux-debug-podman
build/linux/x64/debug/bundle/d4rt_formulas
run-web-release-podman: build-web-release-podman
podman-compose run --entrypoint "cd build/web && python3 -m http.server 8080" flutter

View file

@ -5,8 +5,9 @@ services:
build:
context: .
dockerfile: Dockerfile
image: d4rt-formulas-builder
volumes:
- ./docker/cache:/cache
- .:/app # Link the current directory to /app in the container
environment:
- FLUTTER_FLAVOR=prod # Example environment variable, adjust as needed
command: flutter build apk --release # You can run any Flutter command here

View file

@ -1,11 +0,0 @@
# launch as: firejail --profile=firejail-warp-terminal.profile /opt/warpdotdev/warp-terminal/warp
private /home/alvaro/repos/d4rt_formulas/
blacklist /datos-1T
blacklist /datos-luks/
blacklist /media
# net none # disable network
# noroot # don't run as root
caps.drop all # drop Linux capabilities
# seccomp # enable syscall filtering
First version of a formula widget

View file

@ -356,10 +356,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
url: "https://pub.dev"
source: hosted
version: "1.16.0"
version: "1.17.0"
mime:
dependency: transitive
description:

View file

@ -1 +0,0 @@
firejail --profile=firejail-warp-terminal.profile warp-terminal