小编Ser*_*yak的帖子

通过docker-machine运行带有数据卷的postgres容器

我在运行postgres容器时遇到问题,我在Mac OS机器上为数据文件夹设置了卷.我试着像这样运行它:

docker run \
  --name my-postgres \
  -e POSTGRES_USER=admin \
  -e POSTGRES_PASSWORD=password \
  -e POSTGRES_DB=some_db_dev \
  -v $PG_LOCAL_DATA:/var/lib/postgresql/data \
  -d postgres:9.5.1
Run Code Online (Sandbox Code Playgroud)

每次我在日志中得到以下结果:

* Starting PostgreSQL
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are …
Run Code Online (Sandbox Code Playgroud)

postgresql macos docker boot2docker docker-machine

6
推荐指数
1
解决办法
1121
查看次数

golang:发送带有证书的 http 请求

首先,我是 golang 的新手。

我尝试发送 https 请求。我像这样创建 http.Client:

func httpClient(c *Config) (httpClient *http.Client) {
cert, _ := tls.LoadX509KeyPair(c.CertFile, c.KeyFile)

ssl := &tls.Config{
    Certificates:       []tls.Certificate{cert},
    InsecureSkipVerify: true,
}

ssl.Rand = rand.Reader
return &http.Client{
    Transport: &http.Transport{
        TLSClientConfig: ssl,
    },
}
}
Run Code Online (Sandbox Code Playgroud)

但结果我得到local error: no renegotiation.

谢谢你的帮助!

https go

5
推荐指数
1
解决办法
4361
查看次数

标签 统计

boot2docker ×1

docker ×1

docker-machine ×1

go ×1

https ×1

macos ×1

postgresql ×1