composer create-project --prefer-dist laravel/laravel blog
composer self-update
docker pull laraedit/laraedit
docker run -d --name laravel -p 8080:80 -p 3307:3306 -v ~/git/blog:/var/www/html/app laraedit/laraedit
docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b1dcde7c3ed6 laraedit/laraedit "/bin/bash -c /usr/bi" 10 days ago Exited (0) 10 days ago laravel
docker stop laravel
docker start laravel
docker pull eliep/php7-apache docker run -d --name php7 -v ~/git/x28:/src -p 8000:80 eliep/php7-apache
#進入終端機,修改設定參數 docker exec -it php7 bash
docker exec -it php7 bash #安裝 ssh yum -y install openssh-server /usr/sbin/sshd -D
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key #直接enter ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key #直接enter ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ed25519_key #這檔案可能會不同名稱 yum -y install passwd #改 root 密碼 passwd root
#vi /run-apache.sh 加入啟動 sshd /usr/sbin/sshd -D &
#vi /etc/hosts.allow sshd: ALL
exit
*回到本系統,重定一個 docker commit 容器ID 新映像檔名(myphp7) #執行自已的新容器 docker run -d --name myphp7 -v ~/git/x28:/src -p 8000:80 -p 8822:22 myphp7 #連進入 ssh ssh root@localhost -p 8822
docker save awesomesauce:latest > awesomesauce.tar
Copy the tar file to a thumb drive or whatever, and then copy it to the new host computer. Now from the new host do: docker load < awesomesauce.tar
Now go have a coffee and read hacker news..