LoginSignup
5
13

More than 5 years have passed since last update.

Dockerを起動させる手順

Last updated at Posted at 2017-06-24

Docker環境を構築とローカル環境でConcrete5を動かすのと他の人と共有できるまでの手順を記載する。

構築環境

  • macOS 10.12.4
  • Docker version 17.03
  • docker-compose version 1.11.2

Docker環境を構築

まずは以下のリンクの「Setup」からDockerをインストール
Get Started
「Stable channel(安定版)」をインストール。
ターミナルで以下のコマンドを実行してバージョンが表示されればインスール完了です。

docker --version

Docker version 17.03.1-ce, build c6d412e

dockerの起動

コンテナの一覧表示(コンテナ名を確認)

docker ps -a

「NAMES」の部分がコンテナ名
「PORTS」が空欄の場合は、起動していない状態

CONTAINER ID NAMES
xxxx ここに記載コンテナ名
xxxx        … ここに記載コンテナ名

コンテナの起動

docker start <コンテナID or コンテナ名>
docker start dockerc501_web_1 dockerc501_db_1 db

※エラー文
「Error: failed to start containers:xxxxxxxxxx」が表示されたときはもう一度
「docker start xxxxxxxxxx」と入力。
起動を確認したら、「http://localhost/」にアクセス

コンテナの停止

docker stop <コンテナID or コンテナ名>

コンテナを削除する

docker rm <コンテナID or コンテナ名>

参照:
やってみよう!DockerでWordPress構築~httpd/mysql設定と外部アクセスまで | GMOクラウドアカデミー
Dockerのすべてが5分でわかるまとめ!(コマンド一覧付き) - paiza開発日誌
やってみよう!DockerでWordPress構築~httpd/mysql設定と外部アクセスまで | GMOクラウドアカデミー
chriswayg/concrete5.7 - Docker Hub
chriswayg

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