Coder Social home page Coder Social logo

docker-laravel-cn's Introduction

This Repo is not maintained anymore.

#用docker为laravel打造的开发环境(**优化版)

原项目: https://github.com/Jamlee/docker-laravel


#0x1 快速开始

当前项目的组成:

需要的工具:

  • docker
  • docker-compose

在你运行docker-compose up启动项目之前,你必须启动一个数据容器,这样才能够保持你的数据的数据不被docker-compose rm命令删除

$ docker-compose -f yml/datadev.yml up -d&& docker-compose up
$ ./ctl apache
$ service httpd start

打开url http://localhost你会看到服务已经启动

注意:

  • 你需要自己构建镜像,请使用docker build -t laravel:v1,可能会需要一段时间,遇到问题请及时和我联系[email protected]或者发issue,我会尽我所能的回答你.

使用ctl进入容器:

./ctl apache  #enter the apahce container
./ctl mysql   #enter the mysql  container
./ctl redis   #enter the redis container

docker-laravel-cn's People

Contributors

jamlee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

docker-laravel-cn's Issues

It is not worke.

ayaup@wangker-ThinkPad:/Code/docker-laravel-cn$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c3161ce7a641 redis "docker-entrypoint..." 19 hours ago Up 19 hours 0.0.0.0:6379->6379/tcp dockerlaravelcn_redis_1
7cc44a1c545d mysql:5 "docker-entrypoint..." 19 hours ago Up 19 hours 0.0.0.0:3306->3306/tcp dockerlaravelcn_db_1
ayaup@wangker-ThinkPad:
/Code/docker-laravel-cn$ docker-compose ps
Name Command State Ports

dockerlaravelcn_data_1 /bin/bash Exit 0
dockerlaravelcn_db_1 docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp
dockerlaravelcn_redis_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
ayaup@wangker-ThinkPad:/Code/docker-laravel-cn$ docker-compose up
Recreating dockerlaravelcn_db_1...
Recreating dockerlaravelcn_redis_1...
Pulling web (index.alauda.cn/jamlee/docker-laravel-cn:latest)...
Traceback (most recent call last):
File "", line 3, in
File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.main", line 31, in main
File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.docopt_command", line 21, in sys_dispatch
File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.command", line 34, in dispatch
File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.docopt_command", line 24, in dispatch
File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.command", line 66, in perform_command
File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.main", line 460, in up
File "/code/build/docker-compose/out00-PYZ.pyz/compose.project", line 230, in up
File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 320, in execute_convergence_plan
File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 208, in create_container
File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 236, in ensure_image_exists
File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 693, in pull
File "/code/build/docker-compose/out00-PYZ.pyz/docker.client", line 883, in pull
File "/code/build/docker-compose/out00-PYZ.pyz/docker.auth.auth", line 59, in resolve_repository_name
File "/code/build/docker-compose/out00-PYZ.pyz/docker.auth.auth", line 38, in expand_registry_url
docker.errors.DockerException: HTTPS endpoint unresponsive and insecure mode isn't enabled.
ayaup@wangker-ThinkPad:
/Code/docker-laravel-cn$ docker -v
Docker version 17.04.0-ce, build 4845c56

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.