iT邦幫忙

第 12 屆 iThome 鐵人賽

DAY 20
0
Modern Web

用30days 了解web系列 第 20

(Day 20) Deploy your Laravel project to Docker

  • 分享至 

  • xImage
  •  

yesterday we've learn about basic docker introduction, so for today's article we will try to deploy our laravel project to our docker using docker LAMP, for docker lamp server we will use mattrayner/lamp image.

Install docker lamp
docker pull mattrayner/lamp
after we finish pull the image, we have to run the image to be our container by simply run the following script
docker run -p "80:80" -v ${PWD}/app:/app mattrayner/lamp
now if you run
docker ps -a you lamp container should be on running state.

continue
docker exec -ti #container_name bash now you can access your container using linux scipt.
now you are good to go just simply using git clone and do the same step as you deploy your laravel project on your ubuntu.


上一篇
(day 19) What is docker?
下一篇
(Day 21) 5 Laravel Helpers you should know
系列文
用30days 了解web30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言