0
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 3 years have passed since last update.

gRPC command line toolをAlpine Linuxでビルドする

Posted at

はじめに

デバッグ目的でgrpc_cliをalpineに入れたくてやったらわりと手こずりました。必要なパッケージ見つけるのにけっこう時間がかかったのでメモっておきます。

grpc_cliのセットアップドキュメントは公式のこちらを参考にしました。

ビルドする

alpineにログインする

docker pull alpine:3.13.0
docker run --name alpine-test -itd alpine:3.13.0 /bin/ash
docker exec -it alpine-test /bin/ash

grpcをクローンしてgrpc_cliをビルドする

apk add --update git cmake make clang build-base llvm-static llvm-dev clang-static clang-dev linux-headers
git clone https://github.com/grpc/grpc
cd grpc
git submodule update --init
mkdir -p cmake/build
cd cmake/build
cmake -DgRPC_BUILD_TESTS=ON ../..
make grpc_cli

実行する

./grpc_cli --helpfull
grpc_cli: Warning: SetProgramUsageMessage() never called

  Flags from root/grpc/test/cpp/util/cli_credentials.cc:
    --call_creds (Call credentials to use: none (default), or
      access_token=<token>. If provided, the call creds are composited on top of
      channel creds.); default: "";
    --channel_creds_type (The channel creds type: insecure, ssl, gdc (Google
      Default Credentials), alts, or local.); default: "";
    --local_connect_type (The type of local connections for which local channel
      credentials will be applied. Should be local_tcp or uds.);
...

おわりに

alpineに入ってどうこうするってノウハウわりと探してもないものですね。ググり力が低いのか。。

0
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
0
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?