Files
2021-10-21 15:13:29 +08:00

47 lines
2.8 KiB
XML
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>服务器日常 on 星火文档中心</title>
<link>http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%97%A5%E5%B8%B8/</link>
<description>Recent content in 服务器日常 on 星火文档中心</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Mon, 18 Oct 2021 16:58:57 +0800</lastBuildDate><atom:link href="http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%97%A5%E5%B8%B8/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>docker使用笔记</title>
<link>http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%97%A5%E5%B8%B8/docker/</link>
<pubDate>Mon, 18 Oct 2021 16:59:28 +0800</pubDate>
<guid>http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%97%A5%E5%B8%B8/docker/</guid>
<description>基础
docker ps -a 查看容器列表
docker ps 查看正在运行的容器
exit 退出容器
docker start &amp;lt;docker container id&amp;gt; 启动一个已停止的容器
docker stop &amp;lt;容器id&amp;gt;停止容器
docker restart &amp;lt;容器id&amp;gt;重启容器
进入容器的两个命令 exec命名 docker exec -it &amp;lt;容器id&amp;gt; /bin/bash attach命令退出后会终止容器 docker attach &amp;lt;容器id&amp;gt; docker rm -f &amp;lt;容器id&amp;gt;删除容器
进阶
docker container prune删除所有容器
镜像操作
docker images列出本机镜像
rocket.chat &amp;lt;none&amp;gt; 30f3e81eb8ad 6 months ago 816MB rocket.chat &amp;lt;none&amp;gt; 077d87f42281 6 months ago 816MB rocket.chat &amp;lt;none&amp;gt; 666b6ddfd746 6 months ago 816MB rocket.chat 3.10.5 63bd37a1c5e9 8 months ago 816MB mongo 4.</description>
</item>
<item>
<title>阿里云ecs添加swap</title>
<link>http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%97%A5%E5%B8%B8/ecs%E6%B7%BB%E5%8A%A0swap/</link>
<pubDate>Mon, 18 Oct 2021 16:59:28 +0800</pubDate>
<guid>http://example.org/%E5%B0%8F%E7%99%BD%E6%89%8B%E5%86%8C/%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%97%A5%E5%B8%B8/ecs%E6%B7%BB%E5%8A%A0swap/</guid>
<description>查看当前是没有swap的
$ free -m total used free shared buffers cached Mem: 498 310 187 0 17 170 -/+ buffers/cache: 122 375 Swap: 0 0 0 $ sudo df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/xvda1 ext4 20G 3.7G 16G 20% / tmpfs tmpfs 250M 0 250M 0% /dev/shm 我们将swap挂载到/var下
$ sudo dd if=/dev/zero of=/var/swap bs=1M count=2048
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 47.</description>
</item>
</channel>
</rss>