add: flutter
This commit is contained in:
commit
37276b401a
6 changed files with 124 additions and 1 deletions
24
README.md
24
README.md
|
@ -1,3 +1,25 @@
|
|||
# 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
|
||||
|
|
29
flutter/README.md
Normal file
29
flutter/README.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
# My Awesome Flutter Docker
|
||||
|
||||
it shall be a docker that allows to use the flutter software without
|
||||
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
8
flutter/bin/dflutter
Executable 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
54
flutter/install
Executable 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
5
flutter/src/Dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
|||
FROM instrumentisto/flutter
|
||||
|
||||
COPY execin /bin/
|
||||
|
||||
CMD ["sleep", "infinity"]
|
5
flutter/src/execin
Executable file
5
flutter/src/execin
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd $1
|
||||
shift
|
||||
$*
|
Loading…
Add table
Reference in a new issue