Docker检查点因SQL Server容器而失败

时间:2019-06-26 00:59:48

标签: sql-server docker docker-checkpoint

从头启动Microsoft SQL Server(在Linux上)容器之后...

$ docker run -d -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=pa$$word' \
           -p 1433:1433 -d microsoft/mssql-server-linux

...正在创建Docker checkpoint ...

$ docker checkpoint create mssql cp1

...失败:

Error response from daemon: Cannot checkpoint container mssql: 
failed to read checkpoint reader: 
open /var/lib/docker/containers/f2eb8d17e95630332bbeab887b9e03a1b91efcd8907f69b82805a788331316e2/checkpoints/cp1/cgroup.img: 
no such file or directory

这是在Ubuntu 18.04上安装的CRIU,并启用了实验模式:

$ docker version
Client:
 Version:           18.09.6
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        481bc77
 Built:             Sat May  4 02:35:57 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.6
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       481bc77
  Built:            Sat May  4 01:59:36 2019
  OS/Arch:          linux/amd64
  Experimental:     true

检查其他容器是否正常,只能与SQL映像配合使用。

我是否遗漏了任何东西,或者可能只是docker checkpoint的一个错误(目前是实验功能)?

1 个答案:

答案 0 :(得分:0)

从Docker import psycopg2 import sys, os import numpy as np import pandas as pd import creds as creds import pandas.io.sql as psql ## ****** LOAD PSQL DATABASE ***** ## # Sets up a connection to the postgres server. conn_string = "host="+ creds.PGHOST +" port="+ "5432" +" dbname="+ creds.PGDATABASE +" user=" + creds.PGUSER \ +" password="+ creds.PGPASSWORD conn=psycopg2.connect(conn_string) print("Connected!") # Create a cursor object cursor = conn.cursor() sql_command = "SELECT * FROM {};".format(str("events")) print (sql_command) # Load the data data = pd.read_sql(sql_command, conn) # taking a subet of the data until algorithm is perfected. # seed = np.random.seed(42) # n = data.shape[0] # ix = np.random.choice(n,10000) # df_tmp = data.iloc[ix] # Taking the source and destination and combining it into a list in another column # df_tmp['accounts'] = df_tmp.apply(lambda x: [x['source'], x['destination']], axis=1) data['accounts'] = data.apply(lambda x: (x['source'], x['destination']), axis=1) data['accounts_acc'] = data['accounts'].cumsum().apply(set) 开始,这似乎不再是问题。