はじめに Dockerを使ってDjangoアプリをデプロイできないか調べていたところ、AlpineLinuxをベースしたこちらの記事を見つけたので、実行ユーザーをroot以外へ変更したり、Modelを追加したりと少し手を加えて実装してみました。 今回使用するコードの内容はGithubに保存しているので、動かしてみたい方は7.docker-composeでコンテナを立ち上げるを参考に実行してみてください。 動作環境 Windows、Macのどちらでも動作させることができました。 Dockerのインストールには、Docker for WindowsまたはDocker for Macを利用しています。 また、docker-composeのインストールが必要です。 Get started with Docker for Windows Get started with Docker Desktop