Commit dbb25da 1 parent dd8f063 commit dbb25da Copy full SHA for dbb25da
File tree 5 files changed +11
-17
lines changed
5 files changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,11 @@ RUN adduser -h ${USER_HOME_DIR} -s /sbin/nologin -u 1000 -D ${USER_NAME} && \
28
28
apk add --virtual build_deps $BUILD_DEPS && \
29
29
\
30
30
cp /usr/bin/envsubst /usr/local/bin/envsubst && \
31
- apk del build_deps
31
+ apk del build_deps && \
32
+ wget --quiet -O /tmp/fenv.tar.gz "https://github.com/joseluisq/fenv/releases/download/v1.0.0/fenv_1.0.0_linux_$arch.tar.gz" ; \
33
+ tar xzvf /tmp/fenv.tar.gz -C /usr/local/bin fenv; \
34
+ rm -f /tmp/fenv.tar.gz; \
35
+ chmod +x /usr/local/bin/fenv
32
36
33
37
COPY ./__mysqldump.sh /usr/local/bin/__mysqldump.sh
34
38
COPY ./mysql_exporter /usr/local/bin/mysql_exporter
Original file line number Diff line number Diff line change 4
4
5
5
FILE_ENV=$1
6
6
7
- if [ -z " $FILE_ENV " ]; then
7
+ if [[ -z " $FILE_ENV " ] ]; then
8
8
__mysqldump.sh
9
9
exit 0
10
10
fi
11
11
12
- if [ -f $FILE_ENV ]; then
13
- export $( cat $FILE_ENV | xargs)
14
-
15
- __mysqldump.sh
12
+ if [[ -f $FILE_ENV ]]; then
13
+ fenv -f $FILE_ENV __mysqldump.sh
16
14
else
17
15
echo " file \` $FILE_ENV \` was not found"
18
16
exit 1
Original file line number Diff line number Diff line change 1
1
# # MySQL Export template settings
2
2
# # ------------------------------
3
- # # Note:
4
- # # .env files loading doesn't support comments,
5
- # # so they should be removed before
6
3
7
4
# Connection settings (optional)
8
5
DB_PROTOCOL = tcp
Original file line number Diff line number Diff line change 4
4
5
5
FILE_ENV=$1
6
6
7
- if [ -z " $FILE_ENV " ]; then
7
+ if [[ -z " $FILE_ENV " ] ]; then
8
8
__mysqlimport.sh
9
9
exit 0
10
10
fi
11
11
12
- if [ -f $FILE_ENV ]; then
13
- export $( cat $FILE_ENV | xargs)
14
-
15
- __mysqlimport.sh
12
+ if [[ -f $FILE_ENV ]]; then
13
+ fenv -f $FILE_ENV __mysqlimport.sh
16
14
else
17
15
echo " file \` $FILE_ENV \` was not found"
18
16
exit 1
Original file line number Diff line number Diff line change 1
1
# # MySQL Import template settings
2
2
# # ------------------------------
3
- # # Note:
4
- # # .env files loading doesn't support comments,
5
- # # so they should be removed before
6
3
7
4
# Connection settings (optional)
8
5
DB_PROTOCOL = tcp
You can’t perform that action at this time.
0 commit comments