|
|
Error response from daemon: mount /opt/jumpserver/config/mariadb/mariadb.cnf:/var/lib/docker/overlay2/a0ecacd1f734d4729dda971531bd0f26f35260724ae2a2cf1328e2c06822ad28/merged/etc/mysql/mariadb.cnf, flags: 0x5000: not a directory
* z8 K& D" d5 ?6 s$ a/ t
$ o0 S$ t- }- h! v7 v, O提示报错:# w5 F8 U" a8 b3 p5 Y, T& T2 ?
无法docker cp 容器里的文件到操作系统中:4 l5 \- x1 W1 ?" d, T
docker cp jms_mysql:/tmp/jumpserver.sql /tmp/+ T; V0 m Q: s% i' t, {& z, e
Error response from daemon: mount /opt/jumpserver/config/mariadb/mariadb.cnf:/var/lib/docker/overlay2/a0ecacd1f734d4729dda971531bd0f26f35260724ae2a2cf1328e2c06822ad28/merged/etc/mysql/mariadb.cnf, flags: 0x5000: not a directory
# @3 M' {3 ~) b( z6 U! m3 c! v& p7 c1 Z+ }& r
& H# R$ L& B4 \2 f' Y. Z4 N8 M解决办法就是
- U0 N7 t) x) }' n$ Z; Mcd /opt/jumpserver/config/mariadb/
$ c9 l5 |, _( I* X0 x V cd /opt/jumpserver/config/mariadb/
# N+ m7 `* \- f9 W K+ F[root@localhost mariadb]# ls- r: z- {( I( t" @4 H
mariadb.cnf # n0 d" p# g9 Y1 D m, @* [+ `
[root@localhost mariadb]# ls7 z( k8 Y! U& s1 [8 [1 I
mariadb.cnf $ a9 T7 H) X% k0 v/ Q
9 u. _' B0 v) K& y5 ?9 d' \4 K
[root@localhost mariadb]#rm -rf mariadb.cnf9 ]" F$ e$ C2 h( r) \5 }
9 n, y2 T4 [3 J' r创建一个mariadb.cnf文件
6 I- y' l5 a5 T& X5 b
' s L T3 ^) f# r6 k( Y: tvim mariadb.cnf
, X5 c, l1 Q9 P% i- ^. X; o( K+ `4 E5 g
# The MariaDB configuration file1 O }; f5 D$ K- s
#
0 Y: r- n7 {% {$ w2 B& P& l# The MariaDB/MySQL tools read configuration files in the following order:
1 c: G2 P$ ?7 V3 V, `( U. J0 W# 0. "/etc/mysql/my.cnf" symlinks to this file, reason why all the rest is read.
2 ~; @4 G' B0 ] h1 K: b# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
- {3 C3 g% Y C4 B) b( \ j \( Z# 2. "/etc/mysql/conf.d/*.cnf" to set global options.$ ^( [& t0 d2 M0 P. h
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.) f; s7 b! c2 F7 S+ V7 G
# 4. "~/.my.cnf" to set user-specific options.. ?! C% f! p) R$ q7 ]
#9 I& d5 E/ Y& {0 O3 n6 S' x; y, i
# If the same option is defined multiple times, the last one will apply.4 i/ W# {* ]+ q: Q5 g
#
' a: J+ w, Z6 P- \2 l2 I# One can use all long options that the program supports.6 D- S1 b8 Z0 u5 ?
# Run program with --help to get a list of available options and with6 Z& z6 \; r6 C" g
# --print-defaults to see which it would actually understand and use.
) m* E9 {( @+ L. [, D#
; d' k b; A( E& X6 a# If you are new to MariaDB, check out https://mariadb.com/kb/en/basic-mariadb-articles/
3 y& q+ y* @# i$ w; J9 P8 k% P8 ~' D" ^( k3 M. i: g1 Q
#
O9 O C/ l5 v* L* G+ \# This group is read both by the client and the server
0 f9 l3 n' O, Y& r& x# use it for options that affect everything4 Q, g1 ^# n# G1 D3 O
#4 v& _9 w+ _" A1 h6 U
[client-server], l6 ~1 t. J; p. N; [( e' @$ V, x
# Port or socket location where to connect; y3 P" l, c# f+ j" D( J
# port = 3306
5 `$ O9 J0 n0 W. q. ssocket = /run/mysqld/mysqld.sock
; C6 ]; B9 l- j* A' U a% M" r" ?9 h
# Import all .cnf files from configuration directory
9 {, f# Q2 w- H[mariadbd]
5 b$ b3 i5 t7 L7 h+ p, kskip-host-cache* [. Q- J0 d; ]' ?8 V
skip-name-resolve
; z+ e5 O1 ^4 s# N! _1 x: K- ^% [# C9 p2 [ m, j
!includedir /etc/mysql/mariadb.conf.d/
) ?' ]6 V' i! r! W!includedir /etc/mysql/conf.d// ~/ J" n5 e4 X0 a' h# [" S/ M
( _* W- G ?) Z, S% Z+ _1 P7 C
& o# y# I. |. n& m6 c- N/ q
保存退出就可以解决问题。) R5 p1 G3 V2 K) |
再次docker cp就可以正常复制了。7 _4 h V- r2 t6 m
: m# s; k5 p+ ^$ `, m* A
[root@localhost mariadb]# docker cp jms_mysql:/tmp/jumpserver.sql /tmp/
# B$ V! k: r, G. k9 o* Y- h0 uSuccessfully copied 2.96MB to /tmp/
D1 Q' ?$ \$ ~0 F0 s* u' ^
; o: W, O7 l( P* B% V$ ?9 O$ v- n/ u! ]! f9 z
完美解决。
/ h2 i7 ~ X$ o% ]$ I4 f, D9 E7 U+ W
' g2 S2 ~2 ?3 y
6 S+ V1 L; D6 O9 n6 J) I6 r& `
+ ]: L# ]' J6 H# Z; K- ~5 G( l |
|