add: flutter

This commit is contained in:
zy 2025-04-15 01:21:07 +02:00
parent 9f8aefc3b6
commit 4bbdd2f240
6 changed files with 120 additions and 1 deletions

View file

@ -1,3 +1,25 @@
# My Awesome Docker Apps # My Awesome Docker Apps
hiya~ so i made the app flutter easy to install and use using docker. and since i probably will make other apps i made a dedicated repository. bur for now there's only one app. maybe there will always be only one app. maybe not. who knows. i don't.
## Contributing
### Issues
how to create an issue:
1. go to the "issues" tab
2. create an issue
### Pull requests
how to make a pull request:
1. go to the "pull request" tab
2. create a pull request
### Ask for a security fix
don't use my things if you need lots of security
## Help financially
send it to palestinian families that need money instead

View file

@ -2,3 +2,28 @@
it shall be a docker that allows to use the flutter software without it shall be a docker that allows to use the flutter software without
installing anything else than docker on the computer installing anything else than docker on the computer
## Install
### Install on Linux
how to install on linux:
1. run ./install
2. copy ./bin/dflutter in $PATH
how to use:
1. use 'dflutter' as you would use 'flutter'
### Install on another OS
idk make it work
## Features
tested features:
1. `dflutter run` works for an android connected in usb
2. i don't have a second point
## Contribution
i contributed

8
flutter/bin/dflutter Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
if ( docker start myawesomeflutterdocker > /dev/null ); then
docker exec -it myawesomeflutterdocker execin /files/$PWD flutter $*
else
echo "can't start myawesomeflutterdocke u.u"
echo "maybe you need to reinstall myawesomeflutterdocker y.u"
fi

54
flutter/install Executable file
View file

@ -0,0 +1,54 @@
#!/bin/bash
format() {
echo -ne "\e[$1m"
shift
echo -ne "$*"
echo -e "\e[0m"
}
title() {
format "1" "$*"
}
error() {
format "31" "$*"
}
fail() {
echo
echo "o.q installation failed"
exit
}
title "-.- test docker..."
docker --version
if [ $? != 0 ]; then
error "o.o docker --version failed"
error "'-' you probably need to install docker"
fail
fi
title "'.' building image..."
docker build -t myawesomeflutterdocker src/ || fail
title "',' stopping container 'myawesomeflutterdocker' if running..."
docker stop myawesomeflutterdocker
title "'o' removing container if exists..."
docker container rm myawesomeflutterdocker
title "'O' running new container..."
docker run \
-dt \
--privileged \
--name myawesomeflutterdocker \
-v /:/files \
--device=/dev/bus \
-v /dev/bus/usb:/dev/bus/usb \
myawesomeflutterdocker \
|| fail
echo
echo "^o^ installation success"
echo "'u' you probably want to copy the content of bin/ in your path"

5
flutter/src/Dockerfile Normal file
View file

@ -0,0 +1,5 @@
FROM instrumentisto/flutter
COPY execin /bin/
CMD ["sleep", "infinity"]

5
flutter/src/execin Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
cd $1
shift
$*