Skip to content

Commit

Permalink
Move Docker section to docs/guides
Browse files Browse the repository at this point in the history
According to review, docker section has been moved to sepreated document
  • Loading branch information
spdkimo committed May 26, 2023
1 parent b496308 commit c69d571
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 42 deletions.
43 changes: 1 addition & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ cd ioter
cd ioter
./script/run
```
Or you can use [**Docker image**](./docs/guides/DOCKER.md)

## How to onboarding (with SmartThings App)
![onbooadingGuide 1](https://github.com/Samsung/ioter/assets/131251075/200fd452-549a-4db8-ad7d-bfbd1fef5ebf)
Expand Down Expand Up @@ -99,45 +100,3 @@ https://github.com/project-chip/connectedhomeip/issues/6347

For Ioter contribution, see our [Contributing Guidelines](https://github.com/Samsung/ioter/blob/main/CONTRIBUTING.md) for more information.
We welcome your contribution at any time.


## Docker image support
You can use a Docker image that 'ioter' environment is prepared

It confirmed that is working on below host OS:
- Ubuntu 20.04

It also confirmed that there are unsupported host OS:
- Ubuntu 16.04
- macOS

### How to start
Threre are things to be needed to prepare on host side
1. Set xhost to connect to X server and use X11
> $ xhost +local:root
2. Turn off Bluetooth service
> systemctl stop Bluetooth
or

> service bluetooth stop
### Run docker container
You can run with below command
```
sudo docker run --rm -it -e DISPLAY=$DISPLAY \
-v [HOST_IOTER_PATH]:/home/iot/ioter \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v "$HOME/.Xauthority:/root/.Xauthority:ro" \
--device=[DEVICE_NODE_PATH] \
-v /dev:/dev \
--privileged \
--net=host \
--cap-add=NET_ADMIN --cap-add=SYS_ADMIN \
docker.io/spdkimo/ioter:[VERSION] \
python3 ioter/src/main.py
```
- HOST_IOTER_PATH: Path of ioter repository on host pc
- DEVICE_NODE_PATH: Path of device node. For example, most devices starts with 'dev/ttyACM'
- VERSION: ioter image version. You can find details from https://hub.docker/repository/docker/spdkimo/ioter/
41 changes: 41 additions & 0 deletions docs/guides/DOCKER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Docker image support
You can use a Docker image that 'ioter' environment is prepared.

It confirmed that is working on below host OS:
- Ubuntu 20.04

It also confirmed that there are unsupported host OS:
- Ubuntu 16.04
- macOS
- Any OS running on ARM platform such as Raspberry Pi

## How to start
There are things to be needed to prepare on host side.
1. Set xhost to connect to X server and use X11
> $ xhost +local:root
2. Turn off Bluetooth service
> systemctl stop Bluetooth
or

> service bluetooth stop
## Run docker container
You can run with below command.
```
sudo docker run --rm -it -e DISPLAY=$DISPLAY \
-v [HOST_IOTER_PATH]:/home/iot/ioter \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v "$HOME/.Xauthority:/root/.Xauthority:ro" \
--device=[DEVICE_NODE_PATH] \
-v /dev:/dev \
--privileged \
--net=host \
--cap-add=NET_ADMIN --cap-add=SYS_ADMIN \
docker.io/spdkimo/ioter:[VERSION] \
python3 ioter/src/main.py
```
- HOST_IOTER_PATH: Path of ioter repository on host pc
- DEVICE_NODE_PATH: Path of device node. For example, most devices starts with 'dev/ttyACM'
- VERSION: ioter image version. You can find details from https://hub.docker/repository/docker/spdkimo/ioter/

0 comments on commit c69d571

Please sign in to comment.