0
0

More than 3 years have passed since last update.

ローカルのDockerにLAMP環境を構築

Posted at

はじめに

ローカルのDockerにLAMP環境を構築する方法です。
以下の環境を構築します。
Windows10Proに構築します。

  • CentOS7.4.1708
  • PHP7.2
  • Laravel5.5
  • Apache
  • MySQL5.7
  • phpMyAdmin]

※予め出来ているDockerファイルを利用するため、Dockerファイルの作成方法などを記載するわけではありません。

Docker Desktopのインストール

以下のサイトからDocker Desktopをインストールします。
https://www.docker.com/get-started

Dockerファイル群の配置

以下から、ApaLara.zipをDLし、任意の場所に配置します。
https://github.com/shinjinakatamari/LAMP

配置フォルダの追加

DockerDeskTopを開き、のsetting>Resources>FILE SHARINGで設定フォルダを追加し、Apply&Restartをクリックする

コマンドの実施

コマンドプロンプトを起動し、以下のコマンドで、配置フォルダに移動する。

cd c:¥・・・

以下のコマンドを実行し、Dockerの作成と立ち上げを行う。

docker-compose build
docker-compose up -d

起動確認

http://localhost/
上記にアクセスすると、Laravelのページが表示される。

http://localhost:8080/
上記にアクセスすると、PHPMYAdminのページが表示される。

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