diff options
author | dengyh <dengyuanhong@chinamobile.com> | 2020-08-21 11:00:25 +0800 |
---|---|---|
committer | dengyh <dengyuanhong@chinamobile.com> | 2020-08-21 11:05:11 +0800 |
commit | 929b6228170632c7fd32caeef580faee1a818bcc (patch) | |
tree | 5f231f3cb0cdc4952f81e3d518f2fa9e4a9ecc03 /docker | |
parent | fa50643192cfe2b11c4bc4e15ac0ebda7ac7d452 (diff) |
Remove the process of mysql in vfc-db
Issue-ID: VFC-1727
Change-Id: I17dcb2974e01b845f547891b9f2340c629bd2628
Signed-off-by: dengyh <dengyuanhong@chinamobile.com>
Diffstat (limited to 'docker')
-rw-r--r-- | docker/Dockerfile | 4 | ||||
-rwxr-xr-x | docker/docker-entrypoint.sh | 16 | ||||
-rw-r--r-- | docker/docker-env-config.sh | 25 |
3 files changed, 4 insertions, 41 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 25391f1..4ce2049 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -10,11 +10,9 @@ ADD . /service WORKDIR /service RUN bash docker-env-config.sh -VOLUME /var/lib/mysql -EXPOSE 3306 EXPOSE 6379 USER onap WORKDIR /service -ENTRYPOINT ./docker-entrypoint.sh +CMD ["redis-server"] diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh deleted file mode 100755 index dcfa22a..0000000 --- a/docker/docker-entrypoint.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -if [ -z "$SERVICE_IP" ]; then - export SERVICE_IP=`hostname -i` -fi - -if [ -z "$MYSQL_ROOT_PASSWORD" ]; then - export MYSQL_ROOT_PASSWORD="root" -fi - -date > init.log -echo "SERVICE_IP=$SERVICE_IP" >> init.log -echo "MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD" >> init.log - -# Start the microservice -./instance_run.sh diff --git a/docker/docker-env-config.sh b/docker/docker-env-config.sh index eccdd9e..d2ea727 100644 --- a/docker/docker-env-config.sh +++ b/docker/docker-env-config.sh @@ -3,32 +3,13 @@ add_user(){ useradd onap - chown onap:onap -R /service + chown onap:onap -R /service } install_sf(){ - - sed -i "s|set compatible|set nocompatible|" /etc/vim/vimrc.tiny - echo "set backspace=2" >> /etc/vim/vimrc.tiny - - echo "mysql-server mysql-server/root_password password root" | debconf-set-selections - echo "mysql-server mysql-server/root_password_again password root" | debconf-set-selections - - apt-get update - apt-get install -y gcc libmysqlclient-dev redis-server mysql-server-5.6 mysql-client-5.6 wget unzip build-essential libssl-dev libffi-dev - sed -i "s|bind-address.*|# bind-address = 127.0.0.1|" /etc/mysql/my.cnf - mysql_install_db --user=onap --datadir=/var/lib/mysql - chown -R onap:onap /usr/include/mysql - chown -R onap:onap /usr/share/mysql - chown -R onap:onap /usr/lib/perl5/auto/DBD/mysql - chown -R onap:onap /usr/lib/perl5/DBD/mysql - chown -R onap:onap /usr/bin/mysql - chown -R onap:onap /var/lib/mysql - chown -R onap:onap /var/log/mysql - chown -R onap:onap /etc/init.d/mysql - chown -R onap:onap /etc/mysql - chown -R onap:onap /var/run/mysqld/ + apt-get update + apt-get install -y redis-server } clean_sf_cache(){ |