|
|
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 b0 E2 p0 F: z
/ }" [; ~6 j7 U. z( P( Z* k提示报错:
8 R( X, G5 y9 p无法docker cp 容器里的文件到操作系统中:; _# f% X F; k& {
docker cp jms_mysql:/tmp/jumpserver.sql /tmp/
9 F! b2 r6 u! s, ?% N4 S) CError response from daemon: mount /opt/jumpserver/config/mariadb/mariadb.cnf:/var/lib/docker/overlay2/a0ecacd1f734d4729dda971531bd0f26f35260724ae2a2cf1328e2c06822ad28/merged/etc/mysql/mariadb.cnf, flags: 0x5000: not a directory8 {% z. ~* o$ E$ v
6 K7 u3 A8 l7 ?7 z: E: U# k# S5 @% F" w) {5 [6 I
解决办法就是
5 s& n( \- O: E5 Ccd /opt/jumpserver/config/mariadb/
$ F) o7 `5 Y4 E% N% Q cd /opt/jumpserver/config/mariadb/
. u d& i* e9 ?6 }[root@localhost mariadb]# ls3 v; S3 _$ q0 V) M+ |/ q3 x: X
mariadb.cnf : g/ w6 U. y. {( T O
[root@localhost mariadb]# ls
, E2 \# i1 E. h2 ?. Z; W& vmariadb.cnf , Q3 y8 x/ i) V4 ~8 l6 q
2 s- P/ X& q: a& a H4 o [root@localhost mariadb]#rm -rf mariadb.cnf
9 m; i2 B. t. n2 `4 \) ]2 [ e. Y" A2 j* Y/ x$ G
创建一个mariadb.cnf文件
7 i; J7 k( S5 C2 F* [3 [' n- k; t
4 L3 c3 |8 P% P) x. p. Mvim mariadb.cnf9 _# M. d7 n: }& T: q( p4 S
" n* c* ^1 U3 {: v# The MariaDB configuration file) n$ _' p; }" Y8 b( i% `* r; u/ Y! Y
#/ L* \! f1 z* n9 S3 Z
# The MariaDB/MySQL tools read configuration files in the following order:
+ K0 H0 N4 f' B4 E- C( g5 Y- q# 0. "/etc/mysql/my.cnf" symlinks to this file, reason why all the rest is read.
0 X7 Z1 T% T0 _# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,: H5 `. |+ T$ `/ v# G7 H8 g
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
; ^' W8 C# U* K# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
! s) \8 `% f7 W6 x1 B# 4. "~/.my.cnf" to set user-specific options.
3 n6 R! ~: |# E. e8 o( D#9 _1 H5 o: X2 v( j% U, s5 t
# If the same option is defined multiple times, the last one will apply.6 U; n2 S' } k8 G: A' @
#% M" [' d$ G: Q0 p
# One can use all long options that the program supports.
7 g! _3 |7 F/ @6 W1 u) N# H0 G# Run program with --help to get a list of available options and with2 [+ O' o0 y, d* P- E5 V
# --print-defaults to see which it would actually understand and use. E3 A$ k9 ^" m1 p* W! }
#
0 b0 ~4 j2 [' F/ }# If you are new to MariaDB, check out https://mariadb.com/kb/en/basic-mariadb-articles/
- f6 |! T& m& y( B/ P* |1 Q0 J* h; @& Y8 L" Y* {
#% f( V! k9 ~, I2 I0 u/ s( b7 i
# This group is read both by the client and the server
( B; d/ s8 A x0 l# j1 J$ J# use it for options that affect everything
, |% w3 ` Q6 {+ T2 s g#' p! V% W% E# |
[client-server]! M) w( a7 E8 F7 u, t k8 x. Q
# Port or socket location where to connect7 s2 ?/ c" q' A$ E) T& t
# port = 33067 k6 C4 V& O9 {* B$ D' w
socket = /run/mysqld/mysqld.sock8 ~( F3 s4 ]% i4 Q3 r+ _
3 D# g! j* A/ }9 i5 h2 S' ~
# Import all .cnf files from configuration directory
: i5 D3 Y) k3 I" f1 O" [* l[mariadbd]
9 A! T1 M/ @& }7 cskip-host-cache9 w8 [3 Z7 b( x
skip-name-resolve
. Y5 a: s6 _' R x! w$ W- W! u3 q( f! K0 D. f2 ?9 _- A7 D
!includedir /etc/mysql/mariadb.conf.d/
E2 E! N7 Y6 D- p!includedir /etc/mysql/conf.d/3 L8 t& H8 n0 \
7 c V0 T5 X6 O$ u
5 g# v; d- ` \" x3 A0 j5 p. \保存退出就可以解决问题。9 J5 `7 h* C4 z5 T2 B6 O4 ?
再次docker cp就可以正常复制了。# z. I1 o' V7 i5 `# Q
# J7 c5 {8 M: f, ^5 D, Q, N8 o[root@localhost mariadb]# docker cp jms_mysql:/tmp/jumpserver.sql /tmp/- r0 J! z/ i E, @4 ?, q
Successfully copied 2.96MB to /tmp/
* r- M" m# v( p( L4 m6 G* z* Y' b6 l: E5 o8 s' L
& u2 R8 I/ _$ k( i2 A完美解决。9 u: p1 ?1 k$ ~) f0 Z5 I2 l) g
7 _$ b2 Z9 v* i/ i6 d
7 A) E1 y/ I/ s( n2 a; Z5 o! ~0 i$ u, e d3 W
- w6 w. m' {6 O% r2 p! p! q# f% p
|
|