diff --git a/README.md b/README.md index 8247c69..cdebd24 100644 --- a/README.md +++ b/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 diff --git a/flutter/README.md b/flutter/README.md index 6313a31..8575fca 100644 --- a/flutter/README.md +++ b/flutter/README.md @@ -2,3 +2,28 @@ 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 diff --git a/flutter/bin/dflutter b/flutter/bin/dflutter new file mode 100755 index 0000000..c450151 --- /dev/null +++ b/flutter/bin/dflutter @@ -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 diff --git a/flutter/install b/flutter/install new file mode 100755 index 0000000..19a7edd --- /dev/null +++ b/flutter/install @@ -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" diff --git a/flutter/src/Dockerfile b/flutter/src/Dockerfile new file mode 100644 index 0000000..5e3ec91 --- /dev/null +++ b/flutter/src/Dockerfile @@ -0,0 +1,5 @@ +FROM instrumentisto/flutter + +COPY execin /bin/ + +CMD ["sleep", "infinity"] diff --git a/flutter/src/execin b/flutter/src/execin new file mode 100755 index 0000000..e306d1f --- /dev/null +++ b/flutter/src/execin @@ -0,0 +1,5 @@ +#!/bin/bash + +cd $1 +shift +$*