diff --git a/.dockerfile b/.dockerfile index 27e61a659a1..49e0ac300d2 100644 --- a/.dockerfile +++ b/.dockerfile @@ -1,2 +1,6 @@ +# .dockerfile +.git/ +Dockerfile +docker-compose.yml # .gitignore *~ diff --git a/README.md b/README.md index 79f43f95c84..de67364d55d 100644 --- a/README.md +++ b/README.md @@ -126,3 +126,31 @@ Device B: Renderer Process ```sh $ out/Default/chrome --type=renderer --server-address= ``` + +### Run castanets using docker images + +For user conveniance, a binary version is shared to community via dockerhub repo. + +Usage is straighforward once you installed docker on your system (on debian based OS): + +```sh +sudo apt install docker-compose ; sudo addgroup $USER docker ; su -l $USER +``` + +Pull latest built image (or rebuild it from scratch): + +```sh +docker pull rzrfreefr/castanets +``` + +Then we'll use docker-compose to setup network between 2 processes and then run +the browser and renderer: + + +```sh +git clone --depth 1 https://github.com/tizenteam/Castanets ; cd Castanets + +docker-compose --verbose up default # will dislay version to check your setup (Chromium 63.0.3239.1) +docker-compose up browser # will run browser, wait browser window to be displayed +docker-compose up renderer # to be run in other shell +``` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000000..2f3cfa8d3c1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Copyright: 2018-present Samsung Electronics Co., Ltd. and other contributors + +version: "2" + +networks: + castanets-net: + +services: + + version: + image: rzrfreefr/castanets:latest + command: --version + + browser: + image: rzrfreefr/castanets:latest + command: --no-sandbox https://github.com/samsung/castanets + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix + environment: + - DISPLAY=${DISPLAY} + networks: + castanets-net: + aliases: + - castanets-host + + renderer: + image: rzrfreefr/castanets:latest + command: --no-sandbox --type=renderer --server-address=castanets-host + networks: + - castanets-net