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

Django環境のdocker-composeでハマった話

Posted at

このタイプの構成での開発環境を作る時に自分はこんなエラーに捕まった。

$ docker-compose run サービス名 django-admin.py startproject アプリ名 .
Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"django-admin.py\": executable file not found in $PATH": unknown

sudoをしても通らないし、おそらくこれはpythonのPATHがうまくいってないんだなということから、Dockerfile関連を疑った。

落ちとしては予想通りpython関連のbuildがうまくいっていなかった。
以下で解決

$ docker-compose build # 一旦たてて、Dockerfile内のpythonを備える
$ docker-compose run web django-admin.py startproject webpj .
5
3
3

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