Initial commit
This commit is contained in:
commit
7568e344b3
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
cache
|
||||
work
|
53
Dockerfile
Normal file
53
Dockerfile
Normal file
@ -0,0 +1,53 @@
|
||||
FROM archlinux
|
||||
|
||||
RUN pacman-key --init
|
||||
RUN pacman -Syu --noconfirm
|
||||
RUN pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
|
||||
RUN pacman-key --lsign-key 3056513887B78AEB
|
||||
RUN pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' --noconfirm
|
||||
RUN pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst' --noconfirm
|
||||
RUN <<EOF cat >> /etc/pacman.conf
|
||||
[chaotic-aur]
|
||||
Include = /etc/pacman.d/chaotic-mirrorlist
|
||||
EOF
|
||||
RUN pacman -Syu base-devel android-sdk-cmdline-tools-latest flutter-bin jdk21-openjdk --noconfirm
|
||||
|
||||
RUN <<EOF cat >> /root/init.sh
|
||||
#!/bin/bash
|
||||
export PATH="/opt/flutter/bin/:$PATH"
|
||||
source /etc/profile
|
||||
git config --global --add safe.directory /opt/flutter
|
||||
|
||||
yes | sdkmanager --licenses
|
||||
sdkmanager --install "build-tools;36.0.0" "cmake;3.22.1" "cmdline-tools;latest" "ndk;27.0.12077973" "platforms;android-35" "sources;android-35"
|
||||
EOF
|
||||
|
||||
RUN chmod +x /root/*.sh
|
||||
RUN /root/init.sh
|
||||
|
||||
RUN mkdir /src
|
||||
RUN mkdir /work
|
||||
RUN useradd user -u 1000 -r --create-home
|
||||
RUN chown -R user /opt/flutter/
|
||||
RUN chown -R user /opt/android-sdk
|
||||
RUN chown -R user /src
|
||||
RUN chown -R user /work
|
||||
|
||||
USER user
|
||||
|
||||
RUN <<EOF cat >> /home/user/entrypoint.sh
|
||||
#!/bin/bash
|
||||
export PATH="/opt/flutter/bin/:$PATH"
|
||||
source /etc/profile
|
||||
|
||||
flutter config --no-analytics --no-cli-animations
|
||||
|
||||
cp -r /src/* /work
|
||||
cd /work/firka
|
||||
flutter pub get
|
||||
flutter build apk --release --verbose
|
||||
EOF
|
||||
|
||||
RUN chmod +x /home/user/*.sh
|
||||
|
||||
ENTRYPOINT [ "/home/user/entrypoint.sh" ]
|
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
services:
|
||||
firka-builder:
|
||||
build: .
|
||||
volumes:
|
||||
- ../firka:/src
|
||||
- ./work:/work
|
||||
- ./cache/gradle:/home/user/.gradle
|
||||
- ./cache/pub-cache:/home/user/.pub-cache
|
Loading…
x
Reference in New Issue
Block a user