miguelfreitas / twister-core

twister core / daemon
MIT License
1.42k stars 251 forks source link

-removed custom docker script #452

Open gabrielhesposito opened 3 years ago

gabrielhesposito commented 3 years ago

why

what's removed ./twister-on-docker

what's added ./docker-compose.yml

examples

docker-compose up -d if the image is not present it will be built then run, otherwise if miguelfreitas/twister:latest is present the container it will just run

Step 11/11 : EXPOSE 28332
 ---> Running in 420b741c1eeb
Removing intermediate container 420b741c1eeb
 ---> 896ce70b30cb

Successfully built 896ce70b30cb
Successfully tagged miguelfreitas/twister:latest
WARNING: Image for service twister-core was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating gespo_twister_core_twister-core_1 ... done
% docker images
REPOSITORY              TAG       IMAGE ID       CREATED              SIZE
miguelfreitas/twister   latest    896ce70b30cb   About a minute ago   2.08GB

docker-compose down this kills/removes the container

 % docker-compose down
Stopping twister-core ... done
Removing twister-core ... done
Removing network gespo_twister_core_default
% docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
 %

looks like twister-core is running fine;

% docker logs twister-core
 % docker exec -it twister-core
"docker exec" requires at least 2 arguments.
See 'docker exec --help'.

Usage:  docker exec [OPTIONS] CONTAINER COMMAND [ARG...]

Run a command in a running container
 % docker exec -it twister-core bash
root@2a05d0d59998:/# ps auxx
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1 44.0  8.6 230088 176160 ?       SLsl 21:02   0:09 /twister-core/twisterd -rpcuser=user -rpcpassword=pwd -rpcallowip=172.21.0.1 -htmldir=/twister-html -printtoconsole -port=28333
root        12  1.6  0.1   4244  3488 pts/0    Ss   21:02   0:00 bash
root        26  0.0  0.1   5900  2960 pts/0    R+   21:02   0:00 ps auxx
root@2a05d0d59998:/#
gabrielhesposito commented 3 years ago

ok ready and tested!

gabrielhesposito commented 2 years ago

@miguelfreitas if you can - it's an old one but will help people get the project running locally.