Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharemee committed Jun 16, 2024
1 parent 9a58742 commit 96657cc
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
12 changes: 12 additions & 0 deletions _posts/2024-06-05-Npm-command.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: post
title: Npm command
---

npm install

--save: 安装的依赖包信息会写到 `package.json` 下的 `dependencies` 节点中

--save-dev: 安装的依赖包信息会写到 `package.json` 下的 `devDependencies` 节点中。开发依赖项通常是你只在开发过程中需要的工具,比如测试库、构建工具等。

--save-exact:这个选项告诉 `npm` 精确地安装指定版本的包,在 `package.json` 文件中将会精确记录这个版本号,而不是写成1.18.x或者^1.18.0。
27 changes: 27 additions & 0 deletions _posts/2024-06-13-Docker-with-Redis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
layout: post
title: Docker with Redis
---

## 安装

```powershell
# 拉取镜像
docker pull redis:latest
# 创建存储卷
docker volume create redis
# 创建并运行容器
docker run `
--detach `
--name redis `
--hostname redis `
--publish 6379:6379 `
--volume redis:/data `
redis:latest
```

注意看镜像信息, 若不指定存储卷则其将自动创建一个存储卷

自动创建的存储卷的名称是一个哈希字符串, 不便于查看其所属于哪个容器, 因此还是自己指定一个命名的存储卷好些

0 comments on commit 96657cc

Please sign in to comment.