Top

Tags: Docker

Kubernetes Dynamic Provisioning Using Dedicated GlusterFS and Heketi

Sep 17, 2020 | 753 views

#Linux #Docker #k8s


Comments: 0

Kubernetes Tutorial

Sep 13, 2020 | 828 views

#Docker #k8s

Additional Concepts:
Install a Kubernetes Cluster

  • Using kube-router as Pod Network
kubeadm init  --pod-network-cidr 10.5.0.0/16
kubectl apply -f https://raw.githubusercontent.com/cloudnativelabs/kube-router/master/daemonset/kubeadm-kuberouter.yaml

Troubleshooting
PersistentVolume and PersistentVolumeClaim
kubectl patch pv pv-name -p '{"spec":{"claimRef": null}}'

kubectl patch pvc PVC_NAME -p '{"metadata":{"finalizers": []}}' --type=merge
Using GlusterFS with Kubernetes
StatefulSet

Comments: 0

Set Up a Private Docker Registry on CentOS

Sep 10, 2020 | 745 views

#Linux #Docker

Tutorial refer to here: How To Set Up a Private Docker Registry on Ubuntu 18.04

Also check Sharing docker images without a registry

Comments: 0

Enable sshd service on CentOS7-systemd docker image

Sep 01, 2020 | 1218 views

#Linux #Docker


1. Build a centos7-systemd docker base image refer to official centos on docker hub

Dockerfile for systemd base image


FROM centos:7.8.2003
ENV container docker
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
VOLUME [ "/sys/fs/cgroup" ]
CMD ["/usr/sbin/init"]

Build your base image

$ docker build --rm -t local/centos7-systemd .
2.  Build image with sshd service based upon above base image

Dockerfile of centos7-systemd-sshd 

FROM local/centos7-systemd
RUN yum -y install openssh-server openssh-clients; systemctl enable sshd.service;
CMD ["/usr/sbin/init"]

Build image

docker build --rm -t local/centos7-systemd-sshd .
3. Run a container of centos7-systemd-sshd refer to stackflow
docker run -it -d --name node2 --privileged -e container=docker \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro local/centos7-systemd-sshd /usr/sbin/init

Enter into container's terminal:

docker exec -it node2 bash

End

Comments: 0

Docker Tutorials

Aug 25, 2020 | 785 views

#Docker

Basic Tutorials:

  1. Docker Build: A Beginner’s Guide to Building Docker Images
  2. Docker Curriculum
  3. Awesome Docker

Docker Volume: 

  1. Understanding Docker Volumes with an example 
  2. Docker Tutorial Series : Part 7 : Data Volumes [recommended]

General and comprehensive  Tutorial:

  1. Docker Tutorial Series (Recommended,  there are a lot of content)
  2. Container Tutorials (Looks like a really good resources)

Configure docker image autorestart:


# In order to enable a restart policy, you need to use the --restart argument when executing docker run
docker run -dit --restart unless-stopped httpd

# Or configure a running container
# unless-stopped: The container would always be restarted unless it was manually stopped
docker update --restart unless-stopped container_id


Content from Docker Tutorial Series : 

    Part 1 — Installation

    Part 2 — Basic Commands

    Part 3 — More on Images and Containers

    Part 4 — Docker Hub

    Part 5 — Building your own Docker Images

    Part 6 — Docker Private Registry

    Part 7 — Data Volumes

    Part 8 — Linking Containers

    Part 9 — Writing a Dockerfile

    Part 10 — Docker Swarm Tutorial

    Part 11 — Docker Swarm on Google Compute Engine

    Part 12 — Getting Started with Kubernetes using Minikube

    Part 13 — Docker Management Commands

    Appendix

    Docker : Learning Resources

    Docker Use Cases

    Learning Docker ? Move To The Cloud !


      Comments: 0