2016-08-15 5 views
0

Я новичок в докере, и я попытался запустить демон mariadb в докере. я мог бы запустить MariaDB как демон с помощью командыне удалось запустить докер при установке тома

PS D:\docker> docker run --name mariadb2 -e MYSQL_ROOT_PASSWORD=password -d mariadb 

, но не может работать с командой

PS D:\docker> docker run --name mariadb2 -v /d/docker/volume/db:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password -d mariadb 

папка была создана некоторые файлы там так и должно быть установлен должным образом.

Вот бревно и информацию о системе

> PS D:\docker> docker logs mariadb2 
Initializing database 
2016-08-15 8:50:13 139894536869824 [Note] /usr/sbin/mysqld (mysqld 10.1.16-MariaDB-1~jessie) starting as process 51 ... 
2016-08-15 8:50:13 139894536869824 [Note] InnoDB: Using mutexes to ref count buffer pool pages 
2016-08-15 8:50:13 139894536869824 [Note] InnoDB: The InnoDB memory heap is disabled 
2016-08-15 8:50:13 139894536869824 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 
2016-08-15 8:50:13 139894536869824 [Note] InnoDB: Memory barrier is not used 
2016-08-15 8:50:13 139894536869824 [Note] InnoDB: Compressed tables use zlib 1.2.8 
2016-08-15 8:50:13 139894536869824 [Note] InnoDB: Using Linux native AIO 
2016-08-15 8:50:13 139894536869824 [Note] InnoDB: Using SSE crc32 instructions 
2016-08-15 8:50:13 139894536869824 [Note] InnoDB: Initializing buffer pool, size = 256.0M 
2016-08-15 8:50:13 139894536869824 [Note] InnoDB: Completed initialization of buffer pool 
2016-08-15 8:50:13 139894536869824 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created! 
2016-08-15 8:50:13 139894536869824 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB 
2016-08-15 8:50:13 139894536869824 [Note] InnoDB: Database physically writes the file full: wait... 
2016-08-15 08:50:13 7f3bbc2d17c0 InnoDB: Error: Write to file ./ibdata1 failed at offset 0. 
InnoDB: 1048576 bytes should have been written, only 0 were written. 
InnoDB: Operating system error number 22. 
InnoDB: Check that your OS and file system support files of this size. 
InnoDB: Check also that the disk is not full or a disk quota exceeded. 
InnoDB: Error number 22 means 'Invalid argument'. 
InnoDB: Some operating system error numbers are described at 
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html 
2016-08-15 8:50:13 139894536869824 [ERROR] InnoDB: Error in creating ./ibdata1: probably out of disk space 
2016-08-15 8:50:13 139894536869824 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to 
ailed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in th 
rote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your prec 
2016-08-15 8:50:13 139894536869824 [ERROR] Plugin 'InnoDB' init function returned error. 
2016-08-15 8:50:13 139894536869824 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 
2016-08-15 8:50:14 139894536869824 [ERROR] Unknown/unsupported storage engine: InnoDB 
2016-08-15 8:50:14 139894536869824 [ERROR] Aborting 

PS D:\docker> docker info 
Containers: 1 
Running: 0 
Paused: 0 
Stopped: 1 
Images: 27 
Server Version: 1.12.0 
Storage Driver: aufs 
Root Dir: /var/lib/docker/aufs 
Backing Filesystem: extfs 
Dirs: 77 
Dirperm1 Supported: true 
Logging Driver: json-file 
Cgroup Driver: cgroupfs 
Plugins: 
Volume: local 
Network: host bridge null overlay 
Swarm: inactive 
Runtimes: runc 
Default Runtime: runc 
Security Options: seccomp 
Kernel Version: 4.4.15-moby 
Operating System: Alpine Linux v3.4 
OSType: linux 
Architecture: x86_64 
CPUs: 2 
Total Memory: 1.95 GiB 
Name: moby 
ID: ZCNG:T3MP:ORJH:E5V4:SBTR:PFKC:DMBM:IG2C:QHQE:FICI:ALHP:JKNO 
Docker Root Dir: /var/lib/docker 
Debug Mode (client): false 
Debug Mode (server): false 
Registry: https://index.docker.io/v1/ 
Experimental: true 
Insecure Registries: 
127.0.0.0/8 

PS D:\docker> docker version 
Client: 
Version: 1.12.0 
API version: 1.24 
Go version: go1.6.3 
Git commit: 8eab29e 
Built: Thu Jul 28 21:04:48 2016 
OS/Arch: windows/amd64 
Experimental: true 

Server: 
Version: 1.12.0 
API version: 1.24 
Go version: go1.6.3 
Git commit: 8eab29e 
Built: Thu Jul 28 21:04:48 2016 
OS/Arch: linux/amd64 
Experimental: true 

Заранее спасибо

ответ

0

я до этого была такая же проблема. По-видимому, при использовании докеров на окнах (в моем случае) у него были проблемы с файловым путем. Решение в этом случае было создать объем в докер, используя следующую команду:

docker volume create --name=your_volume 

затем в докер сочинить вы бы что-то вроде

db: 
    image: mariadb  
    volumes: 
     - volume_db:/var/lib/mysql 

Hopes это поможет вам

Смежные вопросы