Ver a proveniência

make start and stop script for docker container runnable

master
Steffen Volkmann há 6 anos
ascendente
cometimento
ddbf0eeacc
2 ficheiros alterados com 13 adições e 16 eliminações
  1. +10
    -8
      start_lava.sh
  2. +3
    -8
      stop_lava.sh

+ 10
- 8
start_lava.sh Ver ficheiro

@@ -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"


+ 3
- 8
stop_lava.sh Ver ficheiro

@@ -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

Carregando…
Cancelar
Guardar