3
3

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.

dockerでLD_PRELOADでライブラリを複数設定する

3
Last updated at Posted at 2015-01-22

問題

普通のコマンドラインからLD_PRELOADを指定する場合

LD_PRELOAD="foo.so bar.so" baz 

とするが、dockerでこれを真似して

docker run --rm -e LD_PRELOAD="foo.so bar.so" ... 

とすると

Unable to find image 'bar.so":latest' locally
FATA[0000] Invalid namespace name (), only [a-z0-9_] are allowed, size between 4 and 30 

のように言われる。どうもイメージ名だと思っているみたいで、コマンドライン引数のパーサーのバグみたいに見えるが、まあ今のところそんなふうである。

解決法

http://man7.org/linux/man-pages/man8/ld.so.8.html
The items of the list can be separated by spaces or colons.
とあるので

docker run --rm -e LD_PRELOAD=foo.so:bar.so ...

のようにすれば良い。

3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?