Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions DockerNotes-16-17thNOv
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ on the container directory

# docker run -d --name web -v /root/ecomm/:/usr/local/apache2/htdocs/ httpd

docker run --name myecomm -d -P -v /root/ecomm:/usr/local/apache2/htdocs/ httpd


Step 3: we should also be able to access the contaienr from brower, so what option will you give in the command

Expand Down
13 changes: 13 additions & 0 deletions DockerNotes/Notes
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,19 @@ once container is created you cannot do volume mapping

DOCKER FILE
*****************************************

FROM ubuntu
RUN apt-get update
RUN apt-get install git -y
COPY copy.txt /tmp
ADD compress.tar.gz /tmp
[ec2-user@DOCKERHOST mydockerfiles]$ vim copy.txt
[ec2-user@DOCKERHOST mydockerfiles]$ [ec2-user@DOCKERHOST mydockerfiles]$ touch compress.txt
[ec2-user@DOCKERHOST mydockerfiles]$ ls
compress.txt copy.txt Dockerfile
[ec2-user@DOCKERHOST mydockerfiles]$ tar -czvf compress.tar.gz compress.txt


Creating our own Images:

2 ways:
Expand Down
35 changes: 35 additions & 0 deletions Kubernetes/Notes
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,46 @@ spec:
kubectl get pods -l app=frontend

For pod and container logs:

--------------------------------------------------------------
vim replicasetdemo.yaml
---
apiVersion: apps/v1
kind: Replicaset
metadata:
name: daniel
spec:
replicas:3
selector:
matchlabels:
type:webserver
template:
metadata:
name:mypod
labels:
author:dan
type:webserver
spec:
containers:
name: c1
image: nginx
...

kubectl create -f replicasetdemo.yaml
kubectl get all
kubectl get pod -l type=webserver
kubectl scale replicaset nameofreplicaset --replicas=5


----------------------------------------------------------------------


kubectl describe pod pod1 | less
kubectl logs pod1
kubectl logs -f pod1
kubectl logs -f pod1 -c c1
kubectl delete pods -l env=QA
kubectl describe service serviceName



Expand Down