make start and stop script for docker container runnable
This commit is contained in:
parent
a3f295b50c
commit
ddbf0eeacc
@ -1,19 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# start sugarcrm
|
||||
# start lava server
|
||||
|
||||
set -x
|
||||
|
||||
# generate and start mysql container
|
||||
docker pull mysql:5.5
|
||||
docker run --volume /media/data/docker/sugarcrm_Ubuntu12.02/mysql:/var/lib/mysql --env MYSQL_ROOT_PASSWORD=12345 --name sugarcrm_mysql --hostname sugarmysql --detach mysql:5.5
|
||||
docker build -t sugarcrm-app .
|
||||
# generate and start lava image / container
|
||||
docker build -t lava-srv .
|
||||
|
||||
# start apache & php & ssh
|
||||
docker run --volume /media/data/docker/sugarcrm_Ubuntu12.02/SugarCE-Full-6.5.26:/var/www/html/ --detach --publish 80:80 --publish 3333:22 --hostname sugarcrm --link sugarcrm_mysql --name sugarcrm_www sugarcrm-app
|
||||
docker run --volume $PWD/volume/backup:/backup \
|
||||
--name lava_srv \
|
||||
--hostname lavaserv \
|
||||
--detach \
|
||||
--interactive \
|
||||
lava-srv
|
||||
|
||||
# show container
|
||||
set +x
|
||||
docker container ls
|
||||
echo docker exec -it sugarcrm_www bash
|
||||
echo connect to lava server bash: "docker exec -it lava-srv bash"
|
||||
|
||||
|
11
stop_lava.sh
11
stop_lava.sh
@ -1,12 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# stop sugarcrm
|
||||
# stop lava server
|
||||
set -x
|
||||
|
||||
# stop apache / php
|
||||
sudo docker stop sugarcrm_www
|
||||
sudo docker rm sugarcrm_www
|
||||
|
||||
# stop mysql
|
||||
sudo docker stop sugarcrm_mysql
|
||||
sudo docker rm sugarcrm_mysql
|
||||
sudo docker stop lava_srv
|
||||
sudo docker rm lava_srv
|
||||
|
Loading…
x
Reference in New Issue
Block a user