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?

あら、postgres:latestを指定すると痛い目見るのね

Last updated at Posted at 2025-10-08

結論

チームで開発する場合要件に合わせてバージョン固定など当たり前に検討するべき。
(はい…すみません。最新が常にいいと思いこんでいます。※諸説ありますが、バグフィクス、セキュリティー面でも)

何が起きたか

Dcokerのイメージでpostgres:latestを使おうとしたところ…

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu/f9fa6dc71f707ae9354347f46054478fc4b1f2e281ac58b11b716af3cbaf7bb4" to rootfs at "/var/lib/postgresql/data": mount src=/run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu/f9fa6dc71f707ae9354347f46054478fc4b1f2e281ac58b11b716af3cbaf7bb4, dst=/var/lib/postgresql/data, dstFd=/proc/thread-self/fd/8, flags=0x5000: no such file or directory: unknown

ぬーん…

Docker Hubの確認

postgresを見ていると…
17あたりから構成変わったから注意してね

あぁ…(察し)

今までは以下のように書いていた。

volumes:
  - ./data/postgresql/data:/var/lib/postgresql/data

だが!最新のlatest(v17以降かな)では

volumes:
  - ./data/postgresql/data:/var/lib/postgresql

としなければならなくなった様子
現場から以上です。

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?