AsaiToshiya

Mar 8, 2023

```
$ podman run -it --rm -p 7000:8080 \
--user=100:100 \
-v $(pwd)/data:/usr/src/app/db:Z \
-v $(pwd)/config.toml:/usr/src/app/config.toml:ro,Z \
--name nostr-relay nostr-rs-relay:latest
```

の意味

#docker

See translation

0
0
0
0
0


Do you have thoughts?

Log in to leave a comment


Replies

AsaiToshiya

@AsaiToshiya

Mar 9, 2023

`--name nostr-relay`

コンテナの名前

#docker

See translation

0

0
0
0
0

AsaiToshiya

@AsaiToshiya

Mar 9, 2023

`-v $(pwd)/config.toml:/usr/src/app/config.toml:ro,Z`

`ro` は、読み取り専用オプション

`$(pwd)/config.toml` を読み取り専用としてバインド マウント

#docker

See translation

0

0
0
0
0

AsaiToshiya

@AsaiToshiya

Mar 9, 2023

`-v $(pwd)/data:/usr/src/app/db:Z`

ホストのディレクトリ (`$(pwd)/data`) をコンテナのディレクトリ (`/usr/src/app/db`) にバインド マウント

`Z` は SELinux ラベルで、バインド マウントされたディレクトリが非共用となる

#docker

See translation

0

0
0
0
0

AsaiToshiya

@AsaiToshiya

Mar 9, 2023

`--user=100:100`

UID:GID でコンテナを起動

デフォルトは root

#docker

See translation

0

0
0
0
0

AsaiToshiya

@AsaiToshiya

Mar 9, 2023

`-p 7000:8080`

コンテナのポート (8080) をホストにポート (7000) にバインド

#docker

See translation

0

0
0
0
0

AsaiToshiya

@AsaiToshiya

Mar 8, 2023

`--rm`

終了時にコンテナを削除

#docker

See translation

0

0
0
0
0

AsaiToshiya

@AsaiToshiya

Mar 8, 2023

`-it`

* 標準入力からコンテナのシェルを操作する
* コンテナがすぐに終了するのを防ぐ

#docker

See translation

0

0
0
0
0