Build Cakephp environment from docker installation Ubuntu

Run Laravel and Cakephp after installing docker-compose


curl https://get.docker.com | sh
sudo usermod -aG docker $USER
sudo reboot
sudo systemctl start docker
sudo systemctl enable docker
docker --version

docker environment construction

sudo curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version

If you add a user to the docker group, you can execute docker commands without sudo, so add it.
Settings on Ubuntu

git clone https://github.com/LaraDock/laradock.git
cd laradock
cp env-example .env

next.Add the following 3 lines to the env file.

vi.env

DB_HOST=mysql
REDIS_HOST=redis
QUEUE_HOST=beanstalkd

Then execute the following command

sudo docker-compose up -d nginx mysql redis beanstalkd
sudo docker-compose ps

Access to the container&Preparation. If you add a user to the docker group, you can execute docker commands without sudo, so add it.

sudo docker exec -it laradock_workspace_1 bash
/var/www# apt-get update
/var/www# composer create-project "laravel/laravel=6.0.*" my-project
ls

You can check the following directories.

my-project

Then exit
Quit root user with

And the command with the following contents

cd /home/user name/Laravel/laradock

vi .env

### Paths #################################################

# Point to the path of your applications code on your host
APP_CODE_PATH_HOST=../
↓
APP_CODE_PATH_HOST=../my-project

Rewrite to.
Return to home

sudo systemctl start docker
sudo systemctl enable docker
docker --version
Log in again

sudo docker-compose up -d nginx mysql redis beanstalkd
sudo docker exec -it laradock_workspace_1 bash

And reset the screen


sudo docker-compose ps
chmod 777 storage -R
chmod 777 bootstrap/cache
docker-compose restart

Recommended Posts

Build Cakephp environment from docker installation Ubuntu
Build a WAS execution environment from Docker
Build mecab (NEologd dictionary) environment with Docker (ubuntu)
Latest docker installation (Ubuntu 20.04 and Ubuntu 20.10)
Build docker environment with WSL
[Note] Flow from docker installation to JupyterLab startup on ubuntu
Build Couchbase local environment with Docker
Build a Node.js environment with Docker
Build PlantUML environment with VSCode + Docker
Build Rails environment with Docker Compose
Build a XAMPP environment on Ubuntu
Build Unity development environment on docker
Build docker + laravel environment with laradock
Docker installation
Until you build the docker environment and start / stop the Ubuntu container
Build a PureScript development environment with Docker
Use docker in proxy environment on ubuntu 20.04.1
Environment construction with Docker (Ubuntu20.04) + Laravel + nginx
Create a MySQL environment with Docker from 0-> 1
Build a Wordpress development environment with Docker
Build Redmine code reading environment on Docker
[Docker] Build Jupyter Lab execution environment with Docker
Build an environment with Docker on AWS
Build an Ultra96v2 development environment on Docker 1
Build TensorFlow operation check environment with Docker
How to build Rails 6 environment with Docker
Build a simple Docker + Django development environment
Template: Build a Ruby / Rails development environment with a Docker container (Ubuntu version)
Build a development environment for Docker + Rails6 + Postgresql
Build a Laravel / Docker environment with VSCode devcontainer
Build a WordPress development environment quickly with Docker
[Java] Build Java development environment on Ubuntu & check execution
Build a simple Docker Compose + Django development environment
Docker on Ubuntu18.04 on WSL2 and VSCode installation instructions
Build a development environment for Docker, java, vscode
[Rails] How to build an environment with Docker
How to build a Pytorch environment on Ubuntu
[First team development ②] Build an environment with Docker
Docker environment construction
JDBC operation check from xampp installation on Ubuntu
Temporarily move Docker environment from Mac to AWS
Install Ubuntu 20.04 in virtual box on windows10 and build a development environment using docker
How to quit Docker for Mac and build a Docker development environment with Ubuntu + Vagrant
Build Ubuntu 20.04 LTS desktop environment on Raspberry Pi 4 (+ Japanese)
[Road _node.js_1-1] Road to build Node.js Express MySQL environment using Docker
How to build docker environment with Gradle for intelliJ
Build an environment of Ruby2.7.x + Rails6.0.x + MySQL8.0.x with Docker
Easily build a Vue.js environment with Docker + Vue CLI
Build Docker + Laravel PHP + Vue.js development environment in 5 minutes
[Note] Build a Python3 environment with Docker in EC2
Command memo to install xeyes in ubuntu docker environment
[Note] Create a java environment from scratch with docker
(For myself) Build gitlab with ubuntu18.04 + docker for home (Note)
Build Java development environment with WSL2 Docker VS Code
Install Rust in WSL2 Ubuntu environment and build WASM build environment
Build Rails (API) x MySQL x Nuxt.js environment with Docker
[Docker] Build a Wordpress environment locally (Win, Mac) quickly
Build WordPress environment with Docker (Local) and AWS (Production)
Try to build a Java development environment using Docker
[2021] Build a Docker + Vagrant environment for using React / TypeScript
[Ubuntu20.04] From ROS-noetic installation to SLAM simulation of turtlebot3