# 容器虚拟机
# Flag
- https://github.com/topics/cloudnative (opens new window)
- https://github.com/topics/openstack (opens new window)
- https://github.com/docker (opens new window)
- https://github.com/boot2docker (opens new window)
- 镜像集合 https://github.com/linuxserver (opens new window)
- 管理容器 https://github.com/louislam/dockge (opens new window)
- https://github.com/portainer/portainer (opens new window)
- 利用Docker实现后台项目模板化配置部署 (opens new window)
- 从零开始学构建Docker镜像:4种实用方法+生产级实践规范 (opens new window)
- https://github.com/StefanScherer/docker-cli-builder (opens new window)
- https://github.com/skanehira/docui (opens new window)
- https://github.com/jesseduffield/lazydocker (opens new window)
- GUI https://github.com/DockStation/dockstation (opens new window)
- 转换为可执行文件 https://github.com/rzane/docker2exe (opens new window)
- 查看docker内文件树 https://github.com/wagoodman/dive (opens new window)
- https://github.com/dockur/windows (opens new window)
- Docker进阶实用命令 (opens new window)
- https://sleele.com/category/docker/ (opens new window)
- https://docs.microsoft.com/zh-cn/virtualization (opens new window)
- https://developer.ibm.com/zh/technologies/containers (opens new window)
- 随笔分类 - Docker (opens new window)
- 容器自动化构建 https://kany.me/tags/docker (opens new window)
- 在 Windows 10 底下不使用 Hyper-V 安裝 Docker (opens new window)
- https://docs.microsoft.com/zh-cn/virtualization/windowscontainers/quick-start/set-up-environment (opens new window)
- https://github.com/badtuxx/DescomplicandoDocker (opens new window)
- https://github.com/yeasy/docker_practice (opens new window)
- 日志查看 https://github.com/amir20/dozzle (opens new window)
- 脚本引擎 https://github.com/dagger/dagger (opens new window)
- https://github.com/boxlite-labs/boxlite (opens new window)
- 镜像下载 https://github.com/luckfu/docker_pull (opens new window)
- https://github.com/DaoCloud (opens new window)
- https://xuanyuan.cloud (opens new window)
- https://docker.1panel.live (opens new window)
- https://docker.1ms.run (opens new window)
- https://hub.rat.dev (opens new window)
- https://dockerproxy.net (opens new window)
- https://proxy.vvvv.ee (opens new window)
- https://registry.cyou (opens new window)
- https://docker.mhtsec.com (opens new window)
- 扫描显示网络节点 https://github.com/karam-ajaj/atlas (opens new window)
- 容器网络通信监控 https://github.com/subtrace/subtrace (opens new window)
- 自己动手写docker https://github.com/xianlubird/mydocker (opens new window)
- https://github.com/weaveworks/weave (opens new window)
- https://github.com/jessfraz/dockerfiles (opens new window)
- https://github.com/sickcodes/Docker-OSX (opens new window)
- Go编写的迷你Docker https://github.com/shuveb/containers-the-hard-way (opens new window)
- 容器编排 https://github.com/hashicorp/nomad (opens new window)
- K8s客户端 https://github.com/kube-rs/kube (opens new window)
- 持续开发 https://github.com/googlecontainertools/skaffold (opens new window)
- K8s检查 https://github.com/derailed/popeye (opens new window)
- 容器编排 https://github.com/rootsongjc/kubernetes-handbook (opens new window)
- 容器教程 https://github.com/itmuch/docker-book (opens new window)
- 微虚拟机 https://github.com/weaveworks/ignite (opens new window)
- 容器运行时 https://github.com/kuasar-io/kuasar (opens new window)
- K8s平台 https://github.com/ben1234560/k8s_paas (opens new window)
- K8s集群 https://github.com/kubernetes/kops (opens new window)
- K8s部署 https://github.com/jetpack-io/launchpad (opens new window)
- 云原生全景 https://landscape.cncf.io (opens new window)
- 微虚拟机 https://firecracker-microvm.github.io (opens new window)
- Docker替代 https://orbstack.dev (opens new window)
- K8s教程 https://github.com/guangzhengli/k8s-tutorials (opens new window)
- AI开发环境 https://github.com/tensorchord/envd (opens new window)
- Docker教程 https://yeasy.gitbook.io/docker_practice (opens new window)
- LXD容器 https://beringresearch.github.io/macpine/lxd_macpine (opens new window)
- macOS虚拟机 https://beringresearch.github.io/macpine (opens new window)
- 容器模式 https://www.cyningsun.com/11-13-2022/design-patterns-for-container-based-distributed-systems-cn.html (opens new window)
- 容器网络 https://mp.weixin.qq.com/s/CsoUigsdQq1kbO8hD3lbsQ (opens new window)
- Helm社区 https://github.com/helm/community (opens new window)
- 本地K8s https://github.com/kubernetes/minikube (opens new window)
- 轻量K8s https://github.com/k3s-io/k3s (opens new window)
- K8s容器 https://github.com/k3d-io/k3d (opens new window)
- 本地K8s https://github.com/kubernetes-sigs/kind (opens new window)
- 轻量K8s https://github.com/ubuntu/microk8s/issues (opens new window)
- 轻量K8s https://github.com/canonical/microk8s (opens new window)
- 轻量K8s https://github.com/k0sproject/k0s (opens new window)
- 容器迁移 https://github.com/cgcl-codes/android-container (opens new window)
- Doris部署 https://github.com/selectdb/doris-operator (opens new window)
- K8s系统 https://github.com/siderolabs/talos (opens new window)
- K8s网络 https://plantegg.github.io/2022/01/19/kubernetes_Flannel%E7%BD%91%E7%BB%9C%E5%89%96%E6%9E%90 (opens new window)
- Docker跑系统 https://github.com/sickcodes/docker-osx (opens new window)
- Docker编排 https://github.com/av/harbor (opens new window)
- K8s部署 https://segmentfault.com/a/1190000044347994 (opens new window)
- 容器SSH https://github.com/containerssh (opens new window)
- 容器调试 https://github.com/iximiuz (opens new window)
- 容器运行时 https://github.com/runfinch (opens new window)
- K8s生态 https://github.com/surki (opens new window)
- 手写容器原理 https://juejin.cn/post/6971335828060504094 (opens new window)
- Docker与k8s https://juejin.cn/post/7015729458959089701 (opens new window)
- 云部署演示 https://github.com/mreferre/yelb (opens new window)
- k3s部署 https://github.com/anthonybudd/s3-from-scratch (opens new window)
- K8s工具集 https://github.com/fabric8io (opens new window)
- 容器运行时 https://github.com/containerd (opens new window)
Docker搭建私有仓库
- 企业级Registry服务器 https://github.com/goharbor/harbor (opens new window)
- Docker 私有仓库搭建 (opens new window)
- 从零搭建docker私有仓库 (opens new window)
# 其他容器技术
- https://hub.grapps.cn (opens new window)
- https://github.com/topics/containers (opens new window)
- OCI开放容器标准 https://github.com/opencontainers (opens new window)
- 云原生技术图谱 https://github.com/cncf/landscape (opens new window)
- OCI,CRI,CRI-O,Containerd 名词解释 (opens new window)
- 策略 https://github.com/open-policy-agent (opens new window)
- https://github.com/falcosecurity (opens new window)
- https://github.com/draios (opens new window)
- https://github.com/istio/istio (opens new window)
- 从开发者的角度比较Kubernetes和Cloud Foundry (opens new window)
- k8s https://github.com/kubernetes (opens new window)
- https://github.com/kubernetes-incubator (opens new window)
- https://github.com/kubernetes-sigs (opens new window)
- https://kubernetes.io (opens new window)
- 存储 https://github.com/openebs/openebs (opens new window)
- 软件包管理器 https://github.com/helm (opens new window)
- 脚本安装K8S集群 https://github.com/easzlab/kubeasz (opens new window)
- https://github.com/armosec/kubescape (opens new window)
- https://github.com/fanux/sealos (opens new window)
- https://github.com/clusternet/clusternet (opens new window)
- https://github.com/genuinetools (opens new window)
- https://github.com/tektoncd/pipeline (opens new window)
- https://github.com/rancher/fleet (opens new window)
- https://github.com/splunk/qbec (opens new window)
- https://github.com/kube-rs (opens new window)
- https://github.com/pipekit (opens new window)
- https://github.com/teamcode-inc/kubeorbit (opens new window)
- https://github.com/chronolaw/k8s_study (opens new window)
- https://github.com/vmware-tanzu (opens new window)
- https://github.com/lightrun-platform (opens new window)
- https://github.com/Rapha-Borges/oke-free (opens new window)
- https://github.com/k8zdev/k8z (opens new window)
- https://github.com/NVIDIA/gpu-operator (opens new window)
- https://github.com/eclipse-che/che (opens new window)
- https://github.com/operator-framework/java-operator-sdk (opens new window)
- https://github.com/TencentBlueKing/bk-bcs (opens new window)
- 监控 https://github.com/keptn (opens new window)
- https://github.com/KusionStack/karpor (opens new window)
- https://github.com/eryajf/kite-desktop (opens new window)
- 负载均衡 https://github.com/metallb/metallb (opens new window)
- https://github.com/kumahq/kuma (opens new window)
- https://github.com/merbridge/merbridge (opens new window)
- https://github.com/linkerd/linkerd2 (opens new window)
- 调度器 https://github.com/Gthulhu/Gthulhu (opens new window)
- https://github.com/openshift (opens new window)
- https://github.com/rook/rook (opens new window)
- https://github.com/lensapp/lens (opens new window)
- https://github.com/jenkins-x (opens new window)
- https://github.com/kinvolk (opens new window)
- https://github.com/dapr (opens new window)
- https://github.com/dokku (opens new window)
- https://github.com/cloudfoundry (opens new window)
- https://github.com/distribution/distribution (opens new window)
- cloud-foundry 的动态 - SegmentFault 思否 (opens new window)
- https://www.terraform.io (opens new window)
- https://github.com/rancher/rancher (opens new window)
- https://github.com/mesosphere/marathon (opens new window)
- Packer
- 谷歌、IBM、微软、Pivotal、SAP、SUSE、Swisscom、GE
- https://github.com/wekan/wekan (opens new window)
- https://github.com/google/gvisor (opens new window)
- https://github.com/fnproject (opens new window)
- https://github.com/verrazzano (opens new window)
- systemd-nspawn以及container的学习 (opens new window)
- https://github.com/eclipseo (opens new window)
- https://github.com/coreos (opens new window)
- Linux Container https://github.com/lxc/lxc (opens new window)
- podman https://github.com/containers (opens new window)
- https://github.com/lxc (opens new window)
- https://github.com/containernetworking/cni (opens new window)
- https://github.com/AdaptiveScale/lxdui (opens new window)
- https://github.com/iongion/container-desktop (opens new window)
- https://github.com/rancher-sandbox/rancher-desktop (opens new window)
- https://github.com/marhkb/pods (opens new window)
- 再见 Docker,是时候拥抱下一代容器工具了 (opens new window)
- podman初试-和docker对比 (opens new window)
- https://github.com/lxc/incus (opens new window)
- https://github.com/containerd/containerd (opens new window)
- https://github.com/orbstack (opens new window)
- https://github.com/moby/moby (opens new window)
- https://github.com/cri-o/cri-o (opens new window)
- https://github.com/kata-containers (opens new window)
- https://github.com/alibaba/pouch (opens new window)
- https://github.com/singularity/singularity (opens new window)
- 集群管理器 https://github.com/apache/mesos (opens new window)
- https://github.com/OpenVZ (opens new window)
- https://github.com/thijsvanloef/palworld-server-docker (opens new window)
- https://github.com/ChrispyBacon-dev/DockFlare (opens new window)
- 微虚拟机 https://github.com/alexellis/firecracker-init-lab (opens new window)
- GPU虚拟化 https://github.com/arc-compute/mdev-gpu (opens new window)
- K8s网络 https://github.com/antrea-io/antrea (opens new window)
- 容器运行时 https://github.com/runfinch/finch (opens new window)
- K8s平台 https://github.com/kubevela/kubevela (opens new window)
- 云平台 https://github.com/labring/sealos/releases (opens new window)
- 证书管理 https://github.com/openshift/certman-operator (opens new window)
- gRPC解析 https://github.com/sercand/kuberesolver (opens new window)
- 容器实现 https://github.com/lucavallin/barco (opens new window)
- K8s集群 https://github.com/kubewharf/kubeadmiral (opens new window)
运行时
- https://github.com/utam0k/youki (opens new window)
- https://github.com/containers/crun (opens new window)
- https://github.com/oracle/railcar (opens new window)
- https://github.com/opencontainers/runc (opens new window)
- https://github.com/abiosoft/colima (opens new window)
- https://github.com/lima-vm/lima (opens new window)
- 运行时守护 https://github.com/aurae-runtime/aurae (opens new window)
# 仓库镜像
- Docker官方映像 https://github.com/docker-library (opens new window)
- https://hub.docker.com (opens new window)
- https://hub.daocloud.io (opens new window)
- https://www.daocloud.io/mirror (opens new window)
- https://github.com/harrisonwang/docxy (opens new window)
- https://github.com/you8023/docker_images_sync (opens new window)
- https://github.com/sky22333/hubproxy (opens new window)
以下镜像地址需要直接配置在docker中,不能通过浏览器访问
- 阿里云 https://cr.console.aliyun.com (opens new window)
- ustc中国科技大学 https://docker.mirrors.ustc.edu.cn (opens new window)
- 网易 http://hub-mirror.c.163.com (opens new window)
- Docker 官方中国区 https://registry.docker-cn.com (opens new window)
- Azure 中国镜像 https://dockerhub.azk8s.cn (opens new window)
- 七牛云加速器 https://reg-mirror.qiniu.com (opens new window)
- 腾讯云 https://mirror.ccs.tencentyun.com (opens new window)
- Docker镜像 https://rupu.net/archives/docker-gs (opens new window)
# Docker命令
# 退出docker容器
# 如果容器内部没有任何程序运行, 一旦执行exit, 退出容器时, 容器将结束运行
exit
# 查看运行中的容器
docker ps
# 查看全部的容器, 包括运行中和已停止运行的容器
docker ps -a
# 通过容器名称删除已经停止运行的容器(test-centos为docker run命令中给容器的命名)
docker rm test-centos
# 通过容器ID删除已经停止运行的容器,与上面的命令效果一样, 060e是containerID的前4位
docker rm 060e
# 强制删除状态为Up, 正在运行中的容器
docker rm -f test-centos
- 容器命令 https://github.com/lavie/runlike (opens new window)
- 零停机部署 https://github.com/wowu/docker-rollout (opens new window)
- Docker练习 https://github.com/play-with-docker/play-with-docker (opens new window)
- 容器调试 https://github.com/iximiuz/cdebug (opens new window)
- 容器CLI https://github.com/containerd/nerdctl (opens new window)
- Docker存储 https://segmentfault.com/a/1190000042914483 (opens new window)
- 容器安全扫描 https://github.com/goodwithtech/dockle (opens new window)
- 容器构建 https://github.com/googlecontainertools/kaniko (opens new window)
- 容器构建 https://github.com/ko-build/ko (opens new window)
- Docker实现 https://github.com/p8952/bocker (opens new window)
- Docker调试 https://github.com/ktock/buildg (opens new window)
- Docker管理 https://github.com/ghostwriters/dockstarter (opens new window)
- 容器端口 https://iximiuz.com/en/posts/docker-publish-container-ports (opens new window)
- 容器实现 https://github.com/hobbybear/tinydocker (opens new window)
# Docker compose
- Docker Compose概述 (opens new window)
- Compose文件参考 (opens new window)
- docker-compose.yml 配置文件编写详解 (opens new window)
- Docker Compose 详解 (opens new window)
- Docker Compose 配置文件详解 (opens new window)
- docker run 和 docker-compose 配置挂载 Volume 并运行 nginx (opens new window)
- https://github.com/Haxxnet/Compose-Examples (opens new window)
Compose 文件是一个 YAML , 主要定义了
services,networks和volumes,其默认路径是./docker-compose.yml
service定义包含了应用与每个容器的配置,很像给docker run传参,同样,network和volume对于docker network create和docker volume create也类似。
像在 Dockerfile (eg:
CMD,EXPOSE,VOLUME,ENV)可以使用的选项也可以在docker run参数中使用, 这样在docker-compose.yml里就不需要再次指定了。
docker-compose.yml里可以使用环境变量,类似Bash格式${VARIABLE}
composer文件格式有两种版本:version 1: 已经废弃, 不支持volumes和networks,默认version key是省略的。version 2: 推荐的格式,目前是最新的,需要通过version '2'指定。
- 数据Docker https://github.com/irbigdata/data-dockerfiles (opens new window)
ports
暴露端口。既可以是
HOST:CONTAINER,也可以只用容器端口(host端口会随机选取)。 当以HOST:CONTAINER的形式映射端口的时候,当容器的端口低于60的时候可能会遇到错误, 因为YAML会解析 xx:yy 数字为60。 基于这个原因,我们推荐明确指定端口映射用字符串的形式。
volumes
挂载指定的路径或者
named volumes, 可以在主机上指定一个路径 HOST:CONTAINER ,或者一个可访问的 HOST:CONTAINER:ro 。
# Dockerfile
- Dockerfile参考 (opens new window)
- 编写Dockerfile的最佳实践 (opens new window)
- Dockerfile 基本命令详解 (opens new window)
- Docker Dockerfile指令大全 (opens new window)
- 创建
Dockerfile文件
vi Dockerfile
- 添加内容
# 使用的基础镜像
FROM centos:7
# 作者信息
MAINTAINER bajins "claer@bajins.com"
# 创建目录
RUN mkdir -p /data/java/jdk1.7.0_80
# 把当前目录下的jdk文件夹添加到镜像
ADD jdk1.7.0_80 /data/java/jdk1.7.0_80
# 创建tomcat目录
RUN mkdir -p /data/java/tomcat-8080
# 把当前目录下的tomcat文件夹添加到镜像
ADD tomcat-8080 /data/java/tomcat-8080
# 添加环境变量
ENV JAVA_HOME /data/java/jdk1.7.0_80
ENV CATALINA_HOME /data/java/tomcat-8080
ENV PATH $PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin
# 暴露容器端口
EXPOSE 8080
EXPOSE 8090
# 启动时运行tomcat
CMD ["/data/java/tomcat-8080/bin/catalina.sh","run"]
FROM centos:7
#安装wget工具
RUN yum -y install wget
#下载并且安装jdk设置环境变量
COPY jdk-8u201-linux-x64.rpm jdk-8u201-linux-x64.rpm
RUN rpm -ivh jdk-8u201-linux-x64.rpm
ENV JAVA_HOME /usr/java/latest/
ENV PATH=$JAVA_HOME/bin:$PATH
ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
RUN rm -rf jdk-8u201-linux-x64.rpm
#时区中文等处理
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo 'Asia/Shanghai' >/etc/timezone
RUN yum -y install kde-l10n-Chinese
#配置显示中文
RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
ENV LC_ALL zh_CN.utf8
RUN echo "export LC_ALL=zh_CN.utf8" >> /etc/profile