2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Appium をインストールする(docker)

2
Last updated at Posted at 2018-04-08

Appium で端末操作を自動化するのにコードを書きたい
かつ、ホスト(Windows) にはあんまり色々いれたくないので、Hyper-V 上の Linux 上の Docker コンテナに Appium をインストール

インストールする環境

  • OS: CentOS 7.4.1708(Docker コンテナ)

手順

  1. https://nodejs.org/ja/download/ から Linux 版バイナリをダウンロード

  2. ダウンロードしたファイルを適当な場所に展開(ここでは /opt)

  3. リンク作る(やんなくてもいい)

    # cd /opt; ln -s node-v8.11.1-linux-x64 node
    
  4. Node 用のユーザを作る (重要)
    root ユーザで npm 実行したら permission denied でパッケージがインストールできない(Node のポリシー?)。ということで、Node 用のユーザとグループを作成し、Node パッケージのインストールはこのユーザで行う

    # groupadd node
    # useradd node -g node
    
  5. g++ インストール
    Appium のインストール中に heapdump のリビルドをするらしく g++ が必要になるので

    # yum install gcc-c++
    
  6. Path を通す & 権限変更

    # echo 'export PATH="/opt/node/bin:${PATH}"' >> /home/node/.bashrc
    # chown -R node.node /opt/node*
    
  7. Appium & wd インストール

    # su - node -c 'npm install -g appium
    # su - node -c 'npm install -g wd
    

最後に

ホスト上に突っ込む場合はこんなことせずに済むと思うんだけど、、、
一年ほど前には、Electron で同じようなことを

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?