Skip to content

Instantly share code, notes, and snippets.

@armanhakimsagar
Last active August 29, 2020 04:04
Show Gist options
  • Save armanhakimsagar/1fdd21a2022e88084214e54755c36eb7 to your computer and use it in GitHub Desktop.
Save armanhakimsagar/1fdd21a2022e88084214e54755c36eb7 to your computer and use it in GitHub Desktop.
Basic :
* Docker hub : Docker Hub is a hosted repository service provided by Docker for finding and sharing container images with your team.
* Docker image : A Docker image is a file, comprised of multiple layers, that is used to execute code in a Docker container.
* Docker file : A Dockerfile is a assemble file.It
is a text document that contains all the commands a user could call on the command line to assemble an image.
Its a file contain assembly image list , working directory.
* Docker compose : Its a file that contain all service confifuration of php, mysqli ,
like which port it will use or restart process or base image ect.
Also it link with docker file.
Service run in container & Docker Compose is used to run & configure multiple containers as a single service.
* Docker container : Its a environment. Containers are a standardized unit of software that allows developers to isolate their app from its environment
* Kubernetes : Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications
Commands :
docker-compose build (build docker file)
docker-compose up -d (for start docker)
docker-compose down (for stop docker)
docker-compose logs (for see error list)
docker ps (all container list)
docker exec -it container_name (open container with specific OS)
https://www.youtube.com/watch?v=ThpnqYpvnIM
https://www.pascallandau.com/blog/php-php-fpm-and-nginx-on-docker-in-windows-10/
Laravel deploy : https://webomnizz.com/containerize-your-laravel-application-with-docker-compose/
_________________________________________
Docker download & kubernates settings :
1. First, download Docker for Windows https://hub.docker.com/editions/community/docker-ce-desktop-windows
2. From setting set configuration by kubernaties
3. make directory : mkdir -p "C:/codebase/docker-php/app"
4. download offical image :
docker run -d --name docker-php -v "F:/Docker/docker-php/app":/var/www php:7.0-cli
docker run // run a container
-d // in the background (detached)
--name docker-php // named docker-php
-v "C:/codebase/docker-php/app":/var/www // sync the directory C:/codebase/docker-php/app on the
// windows host with /var/www in the container
php:7.0-cli // use this image to build the container
______________________________________________
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment