sed ip to host for docker (#391)

This commit is contained in:
gcxfd 2020-11-11 13:50:09 +08:00 committed by GitHub
parent 1ab6dfceb1
commit d7acc88c05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -7,6 +7,9 @@ RUN nightingale/control build
FROM centos:7
WORKDIR /home/n9e
COPY --from=builder /home/n9e/builder/nightingale/ .
RUN \
sed -i "s/127.0.0.1:6379/redis:6379/g" `grep -rl "127.0.0.1:6379" ./etc/` &&\
sed -i 's/127.0.0.1/mysql/g' etc/mysql.yml
COPY entrpoint.sh .
RUN yum install mysql net-tools -y
ENTRYPOINT ./entrpoint.sh
ENTRYPOINT ./entrpoint.sh

View File

@ -1,8 +1,4 @@
#!/bin/bash
sed -i 's/127.0.0.1/mysql/g' etc/mysql.yml
sed -i 's/addr: 127.0.0.1:6379/addr: redis:6379/g' etc/rdb.yml
sed -i 's/addr: 127.0.0.1:6379/addr: redis:6379/g' etc/monapi.yml
sed -i 's/addr: 127.0.0.1:6379/addr: redis:6379/g' etc/judge.yml
mysqlRootPassword=1234