build: Add .dockerignore and update Dockerfile for improved build process
parent
af130815e1
commit
1b524e96af
@ -0,0 +1,72 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
*.snap
|
||||
.DS_Store
|
||||
.local/
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
prime
|
||||
|
||||
# libolm package
|
||||
/assets/js/package
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.packages
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Web related
|
||||
docs/tailwind.css
|
||||
|
||||
# Exceptions to above rules.
|
||||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
|
||||
|
||||
|
||||
/key.jks
|
||||
/android/key.properties
|
||||
**/android/app/.cxx
|
||||
android/key.jks
|
||||
android/keys.json
|
||||
android/Gemfile.lock
|
||||
lib/l10n/*.dart
|
||||
ios/Flutter/.last_build_id
|
||||
ios/Podfile.lock
|
||||
ios/Runner.ipa
|
||||
ios/Runner/GoogleServices-Info.plist
|
||||
|
||||
/windows/out
|
||||
/winuwp/out
|
||||
/linux/out
|
||||
/macos/out
|
||||
.vs
|
||||
olm
|
||||
docs/node_modules
|
||||
rust
|
||||
|
||||
libcrypto.3.dylib
|
||||
android/app/src/main/jniLibs/**
|
||||
android/app/google-services.json
|
||||
web/pkg/package.json
|
||||
web/pkg/vodozemac_bindings_dart_bg.wasm
|
||||
web/pkg/vodozemac_bindings_dart.js
|
@ -1,21 +1,34 @@
|
||||
FROM ghcr.io/cirruslabs/flutter as builder
|
||||
|
||||
RUN sudo apt update && sudo apt install curl wget jq build-essential -y
|
||||
|
||||
WORKDIR /tmp
|
||||
|
||||
RUN wget https://github.com/mikefarah/yq/releases/download/v4.40.5/yq_linux_amd64.tar.gz
|
||||
RUN tar -xzvf ./yq_linux_amd64.tar.gz
|
||||
RUN mv yq_linux_amd64 /usr/bin/yq
|
||||
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
|
||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||
|
||||
RUN rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||
# use this line for arm chips and comment the above line
|
||||
# RUN rustup component add rust-src --toolchain nightly-aarch64-unknown-linux-gnu
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./scripts/prepare-web.sh /app/scripts/prepare-web.sh
|
||||
RUN ./scripts/prepare-web.sh
|
||||
COPY config.* /app/
|
||||
|
||||
COPY pubspec.yaml /app/pubspec.yaml
|
||||
COPY pubspec.lock /app/pubspec.lock
|
||||
RUN flutter pub get
|
||||
|
||||
COPY . /app
|
||||
RUN flutter gen-l10n
|
||||
RUN flutter build web --dart-define=FLUTTER_WEB_CANVASKIT_URL=canvaskit/ --release --source-maps
|
||||
|
||||
FROM docker.io/nginx:alpine
|
||||
RUN rm -rf /usr/share/nginx/html
|
||||
COPY --from=builder /app/build/web /usr/share/nginx/html
|
||||
COPY --from=builder /app/config.json /usr/share/nginx/html
|
||||
|
Loading…
Reference in New Issue