Va medianamente con podman, no consigo que se creeen muchos containers
This commit is contained in:
parent
4a42dc49d9
commit
a0d9a34182
6 changed files with 39 additions and 26 deletions
27
Dockerfile
27
Dockerfile
|
|
@ -1,18 +1,23 @@
|
||||||
# Use the official Flutter SDK image
|
# 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
|
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 ./
|
COPY pubspec.yaml pubspec.lock ./
|
||||||
RUN flutter pub get
|
RUN flutter pub get
|
||||||
|
|
||||||
# Copy the rest of the application code
|
# Copy the rest of the application code and build
|
||||||
COPY . .
|
# Commented out to avoid building the app during image creation, this will be handled externally by makefile
|
||||||
|
# COPY . .
|
||||||
# Build the Flutter app for Android
|
# RUN flutter build apk --release
|
||||||
RUN flutter build apk --release
|
|
||||||
|
|
||||||
# Use the following entrypoint if you want to run the app in a container
|
|
||||||
# ENTRYPOINT ["flutter", "run", "--release"]
|
|
||||||
|
|
|
||||||
19
Makefile
Normal file
19
Makefile
Normal 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
|
||||||
|
|
@ -5,8 +5,9 @@ services:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
image: d4rt-formulas-builder
|
||||||
volumes:
|
volumes:
|
||||||
|
- ./docker/cache:/cache
|
||||||
- .:/app # Link the current directory to /app in the container
|
- .:/app # Link the current directory to /app in the container
|
||||||
environment:
|
environment:
|
||||||
- FLUTTER_FLAVOR=prod # Example environment variable, adjust as needed
|
- FLUTTER_FLAVOR=prod # Example environment variable, adjust as needed
|
||||||
command: flutter build apk --release # You can run any Flutter command here
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -356,10 +356,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
|
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.16.0"
|
version: "1.17.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
firejail --profile=firejail-warp-terminal.profile warp-terminal
|
|
||||||
Loading…
Reference in a new issue