/hacknight-docker

AWS Hacknight - Linux Container & Docker workshop

Primary LanguageDockerfile

Instructions

git clone https://github.com/tuvshuud/hacknight-docker.git
cd hacknight-docker
git clone https://github.com/bricehartmann/laravel-5.7-task-app.git laravel-todo
# https://github.com/tuvshuud/php7-apache-laravel
docker pull tuvshuud/php7-apache-laravel
docker images
# create mysql container
docker run -d \
    -e MYSQL_ROOT_PASSWORD=qwe123 \
    -e MYSQL_DATABASE=todos \
    --name todo-db mysql:5.7.9 --character-set-server=utf8 --collation-server=utf8_general_ci

cp Dockerfile laravel-todo/
cp entrypoint.sh laravel-todo/
cd laravel-todo

cp .env.example .env
'''
# modify .env
DB_HOST=todo-db
DB_PORT=3306
DB_DATABASE=todos
DB_USERNAME=root
DB_PASSWORD=qwe123
'''

docker build . -t hacknight/todo_web:latest

docker run -d -p 8000:80 --link todo-db \
    --name todo-web hacknight/todo_web:latest
cp docker-compose.yml laravel-todo/
docker-compose build --no-cache
docker-compose up -d
docker-compose stop
docker-compose rm -f
docker-compose start

Survey

https://goo.gl/forms/QJecihmNMKuAWr3J2