提交
This commit is contained in:
parent
1f0f301c5b
commit
8788253c75
@ -485,7 +485,7 @@ Dockerfile 是一个用来构建镜像的文本文件,文本内容包含了一
|
||||
docker build -t nginx:v3 .
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
### 上下文路径
|
||||
|
||||
@ -613,6 +613,13 @@ networks:
|
||||
external: true
|
||||
```
|
||||
|
||||
### 构建 Dockerfile 时打印RUN命令的输出
|
||||
|
||||
```shell
|
||||
# 在docker build命令最后加上此命令 --no-cache 不缓存
|
||||
--progress=plain --no-cache
|
||||
```
|
||||
|
||||
# Docker 磁盘占用清理
|
||||
|
||||
## docker system 命令
|
||||
@ -867,6 +874,56 @@ docker pull mcr.microsoft.com/mssql/server
|
||||
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Wyd210213" -p 1433:1433 --memory 2000M --name sqlserver2022 --restart=always -v /etc/sqlserver_data:/var/opt/mssql -d mcr.microsoft.com/mssql/server
|
||||
```
|
||||
|
||||
### 安装破解内存限制
|
||||
|
||||
建立构建自定义镜像文件夹
|
||||
|
||||
```shell
|
||||
mkdir crack-tiny-mssqlserver
|
||||
cd crack-tiny-mssqlserver
|
||||
```
|
||||
|
||||
新建python2脚本
|
||||
|
||||
```shell
|
||||
vim crack.py
|
||||
```
|
||||
|
||||
```python
|
||||
oldfile = open("sqlservr.old", "rb").read()
|
||||
newfile = oldfile.replace("\x00\x94\x35\x77", "\x00\x80\x84\x1e")
|
||||
open("sqlservr", "wb").write(newfile)
|
||||
exit()
|
||||
```
|
||||
|
||||
新建Dockerfile文件
|
||||
|
||||
```shell
|
||||
vim Dockerfile
|
||||
```
|
||||
|
||||
```dockerfile
|
||||
FROM mcr.microsoft.com/mssql/server:2022-latest
|
||||
USER root
|
||||
RUN cd /opt/mssql/bin/ && mv sqlservr sqlservr.old
|
||||
COPY crack.py /opt/mssql/bin/
|
||||
WORKDIR /opt/mssql/bin/
|
||||
RUN apt-get update && apt-get install -y python2
|
||||
RUN ls && python2 /opt/mssql/bin/crack.py && chmod -R 777 /opt/mssql/bin/sqlservr
|
||||
```
|
||||
|
||||
在 **crack-tiny-mssqlserver** 目录下执行构建镜像
|
||||
|
||||
```shell
|
||||
docker build -t linux-sqlserver:2022 .
|
||||
```
|
||||
|
||||
|
||||
```shell
|
||||
mkdir /usr/local/docker/linux-sqlserver2022
|
||||
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Wyd210213" -e "MSSQL_COLLATION=Chinese_PRC_CI_AS" -p 11433:1433 --name linux-sqlserver2022 --restart=always -v /usr/local/docker/linux-sqlserver2022:/var/opt/mssql -v /etc/localtime:/etc/localtime:ro -e TZ="Asia/Shanghai" -d linux-sqlserver:2022
|
||||
```
|
||||
|
||||
## Docker 安装 PostgreSQL
|
||||
|
||||
```shell
|
||||
@ -877,6 +934,14 @@ docker run -d -p 15432:5432 --name postgres16 --restart=always -v /usr/local/doc
|
||||
|
||||
```
|
||||
|
||||
## Docker 安装 Timescaledb
|
||||
|
||||
```shell
|
||||
docker run -d -p 15433:5432 --name timescaledb-pg16 --restart=always -v /usr/local/docker/timescaledb-pg16/pgdata/data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=Wyd210213 timescale/timescaledb:latest-pg16
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Docker 安装 MySQL 8
|
||||
|
||||
```shell
|
||||
|
||||
@ -12,8 +12,14 @@ top_img: https://gcore.jsdelivr.net/gh/volantis-x/cdn-wallpaper/abstract/67239FB
|
||||
## Git 全局设置:
|
||||
|
||||
```shell
|
||||
git config --global user.name "wenyongda"
|
||||
git config --global user.email "bmdzh11713@163.com"
|
||||
git config --global user.name "username"
|
||||
git config --global user.email "email"
|
||||
```
|
||||
|
||||
## 拉取项目
|
||||
|
||||
```shell
|
||||
git clone <url>
|
||||
```
|
||||
|
||||
## 创建 git 仓库:
|
||||
@ -24,6 +30,8 @@ cd aaa
|
||||
git init
|
||||
touch README.md
|
||||
git add README.md
|
||||
# 添加当前目录下全部文件
|
||||
git add .
|
||||
git commit -m "first commit"
|
||||
git remote add origin https://gitee.com/wenyongda/aaa.git
|
||||
git push -u origin master
|
||||
@ -112,3 +120,28 @@ git config --global http.proxy 'http://127.0.0.1:代理的port'
|
||||
git config --global https.proxy 'http://127.0.0.1:代理的port'
|
||||
```
|
||||
|
||||
## 解决remote: Support for password authentication was removed on August 13, 2021.
|
||||
|
||||
1. Github 头像处 **Settings**
|
||||
|
||||
2. 左侧最下边 **Developer settings**
|
||||
|
||||
3. 左侧找到 **Personal access tokens**
|
||||
|
||||
4. 点击展开,找到 **Tokens (classic)**
|
||||
|
||||
5. 右侧下拉框 **Generate new token (classic)**
|
||||
|
||||
6. 按以下配置
|
||||

|
||||
|
||||
7. 得到 token
|
||||

|
||||
|
||||
8. 修改现有项目的url
|
||||
```shell
|
||||
git remote set-url origin https://<your_token>@github.com/<USERNAME>/<REPO>.git
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
@ -77,3 +77,5 @@ TOAST区块的最大长度: 1996
|
||||
"C:\Program Files\PostgreSQL\9.3\bin\pg_archivecleanup" -d "E:\PostgreSQLArchive" 000000010000000100000047
|
||||
```
|
||||
|
||||
# TimescaleDB
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user