type
status
date
slug
summary
tags
category
icon
password
Reminder
URL
Serial
Note
Description
Category
Wordpress Link
Anydesk: 1855809607

I. Introduction to Web Applications:

A web (based) application is any program that is accessed over a network connection using HTTP, rather than existing within a device’s memory
Performance – Speed – Accessibility – Security – Cost – Scalability
  1. Build your app
  1. Pack it for shipping
  1. Host or run the app

II. Creating Simple Web Application:

Demo: Making a Webapp
Ubuntu 16.04
paste the 2 line in the end of the file then save the file and exit nano:
“Containers are an abstraction at the Application layer that packages codes and dependencies together”
Containers:
  • . Consume less storage and memory
  • . Easier and faster to ship
  • . If they work on one machine, they work on all machines
  • . Cost efficient and easy to scale
  • . Possible to eliminate data loss and downtime
who are using containers:
Google expedia paypal gsk pokemon go
“Docker is an open platform for developers and system admins to build, ship and run containerized applications”
Docker:
  • . Most widely used containerization platform
  • . Huge community support
  • . Large amount of 3rd party application support
  • . Works on Windows and Mac too
Install docker on linux
Demo: 1st application with Docker
Docker architecture and Docker files
notion image
 
Docker Engine Architecture
notion image
 
notion image
 
 
Demo: Write your Dockerfile (Fundamental Instructions)
pwd
tree -L 1
tree -l -d
 
notion image
 
cd CC_Docker/S2/D-1
touch Dockerfile
nano Dockerfile
Docker build -t img_from .
docker images
Demo2:
cd /home/username/CC_Docker/S2/D-2
touch Dockerfile
nano Dockerfile
docker build -t img_run-env .
docker run -ith —name cont_run-env img_run-env
docker ps -a
docker exec -it cont_run-env bash
ls
echo $USER
echo $SHELL
echo $LOGNAME
cd /home
ls
exit
Demo: Write your Docker file (Expose Instruction)
cd CC_Docker/S2/D-6
ls
touch Dockerfile
nano Dockerfile
docker build -t img_expose .
docker images
docker run -itd -rm -name cont_expose -p 8080:80 img_expose
docker ps -a
Note for the upcoming Apache demo Hello everyone!
So, in the previous lecture, we containerized Nginx web-server and ubuntu as the runtime environment for it. We exposed the Nginx container’s port 80 and mapped it with Docker host’s port 8080.
Our container is still serving on the host port 8080.
Now, in order to run our Apache container successfully, we need to free up port 8080 for course continuity purposes.
Use the following command to do so:
docker container stop cont_expose
Note: This updated text has been added as a result of multiple student queries.
Happy Learning:)
Demo: Containerize Apache Web-Server
cd CC_Docker/S2/D-7
ls
touch Dockerfile
nano Dockerfile
docker build -t img_apache .
docker run -itd —name cont_apache -p 8080:80 img_apache
 
  1. Docker Images and Containers
    1. 3.1 Introduction to Docker Images
      notion image
      3.2 Demo: Docker Hub Walkthrough
      1. Go to https://hub.docker.com
      1. Create an account
       
      3.3 Demo: Working with Docker Images | Search, List, Push, Pull
      docker search python:3.6
      docker search registry
      docker search --filter "is-official=true" registry
      docker search --format "table {{.Name}}\t{{.Description}}\t{{.IsOfficial}}" registry
      docker images / docker image ls
      docker images ubuntu
      docker images ubuntu:16.04
      docker images --no-trunc ubuntu:16.04
      docker image pull nginx:latest
      docker image pull nginx:alpine
      docker images nginx
      docker image pull --all-tags nginx
       
      Navigate back to Docker Hub ⇒ Create Repository (make a repo and push image to it)
      1. Namespace: same as user name
      1. Repository name: repo-nginx
      1. Short Description: This is nginx repo created and maintained by …
      1. Full Description:
      1. Visibility: public / private (Docker offers 1 private repo and unlimited public repo with free Docker hub account)
      1. docker login -u dpham1989
        1. dckr_pat_ESJ2tcZuyGLTLX9BFWCjaFwkjx8
      1. docker tag nginx:latest dpham1989/repo-nginx:cc-nginx
      1. docker images
      1. docker image push dpham1989/repo-ngninx:cc-nginx
      1. check on docker hub
       
       
      3.4 Demo: Know your Docker Image | Inspect and History
       
      3.5 Demo: Pruning and Removing Images
      3.6 A Container is born!
       
      3.7 Demo: Container Run Vs Create
       
      3.8 Demo: Working with Containers | Start, Stop and Rename
      3.9 Demo: Attach and execute commands on a running container
       
       
 
 
 
 
 
 
Mac OS applicationSidekick pro using windows sandbox