-
dockerfile
查看全部 -
Jenkins 模块?post steps
查看全部 -
一个service由多个pod组成,对外提供服务;副本是指一个pod的多个实例
apiVersion: v1
kind: Service (定义多个pod组成的服务)
...
spec:
...
selector:
app: maven(只要是maven app的pod,组成)
---
apiVersion: extensions/v1beta1
kind: Deployment (定义pod的部署信息)
...
spec:
...
template:
metadata:
labels:
app: maven
查看全部 -
Kubectl create -f test.yaml:让k8s创建应用,根据test.yaml这个文件。
docker:容器,集装箱
kubernetes:对容器的操作,复制、管理、自动化部署...
查看全部 -
实验环境
查看全部 -
spring boot 项目地址
查看全部 -
docker是什么
docker的特定
查看全部 -
1.设置桥接 2.设置root密码 3.设置ssh连接 4.关闭防火墙 5.设置科学上网查看全部
-
三生三世十里桃花
查看全部 -
Docker基本概念
查看全部 -
Docker的架构
查看全部 -
Docker的特点
查看全部 -
容器对比虚拟机,以及容器的特点:轻量级、可移植、资源占用少
查看全部 -
apt-get update
apt-get install -y docker.io
阿里云加速器配置(https://cr.console.aliyun.com/)
sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://xxxx.mirror.aliyuncs.com"] } EOF sudo systemctl daemon-reload sudo systemctl restart docker
docker pull mysql:5.6
docker run -p 3306:3306 --name mymysql -v /home/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.6
镜像[image]、容器【container】、仓库【registry】
仓库分公有和私有的两种。Docker hub是默认的仓库【https://hub.docker.com/search?q=mysql&type=image】。
版本查看:docker version
镜像拉取: docker pull image-name
镜像查看:docker images docker image ls
镜像删除
docker pull nginx
docker images
docker rmi nginx
容器运行、端口映射、挂存储卷
docker run -p 3306:3306 --name mymysql -v /home/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.
# docker run 即运行容器 # -p 3306:3306 宿主机端口端口:docker容器中端口进行映射 # --name mymysql 容器名称 # -v /home/mysql/data:/var/lib/mysql 宿主机的目录:容器中数据存储目录进行映射 # -e MYSQL_ROOT_PASSWORD=123456 设置root用户名123456,需要哪些环境变量?去dockerhub
进入容器: docker exec -it container-id /bin/bash
查看容器日志 :
进入容器后,查看日志
docker logs -f container-id
查询容器 : 正在运行的容器 docker ps
所有的容器 docker ps -a
设置环境变量
容器停止: docker stop container-id
容器删除: docker rm container-id
仓库登录:https://cr.console.aliyun.com/cn-hangzhou/instance/credentials
sudo docker login --username=叶2019dec registry.cn-hangzhou.aliyuncs.com
19. 镜像的构建:
docker build -t aaa:1.0 .
docker build -t aaa:1.0 -f /root/Dockerfile
20. 镜像打tag
21. 镜像推送:
查看全部 -
1、配置SSH
sudo passwd root sudo gedit /etc/ssh/ssh_config # PermitRootLogin yes systemctl restart sshd sudo apt-get update sudo apt-get install ssh sudo gedit /etc/ssh/sshd_config # PermitRootLogin yes systemctl restart sshd ip a
Microsoft Windows [版本 10.0.19041.746]
(c) 2020 Microsoft Corporation. 保留所有权利。
C:\Users\yerenyun>ssh root@192.168.123.133
The authenticity of host '192.168.123.133 (192.168.123.133)' can't be established.
ECDSA key fingerprint is SHA256:KaqhMqZ7O0hPgTg7eR9aM5nc1gichGRvge/tF7VlGqM.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.123.133' (ECDSA) to the list of known hosts.
root@192.168.123.133's password:
Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 5.8.0-38-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
345 updates can be installed immediately.
140 of these updates are security updates.
To see these additional updates run: apt list --upgradable
Your Hardware Enablement Stack (HWE) is supported until April 2025.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
root@ubuntu:~#
# 关闭防火墙
ufw disable
root@ubuntu:~# ufw disable Firewall stopped and disabled on system startup root@ubuntu:~#
查看全部
举报