Page 1 of 1

Successful Dockerize Vesta but...

Posted: Wed May 06, 2015 9:34 am
by jujes
In order to keep my web projects isolated under the secure environment into a container I tried to install Vesta for the simple way to manage the server and if for some reason I need move to other VPS or infrastructure the fast of docker is amazing.

The way of build the container is:
# I don't need use sudo whit docker because i add the user whit this command

Code: Select all

sudo usermod -aG docker MY-USSER-NAME
# first pull the official ubuntu repo

Code: Select all

docker pull ubuntu-upstart
# run the container whit some ports open and a folder for eventually use of vagrant (if I develop whit virtual box)

Code: Select all

docker run -d -v /vagrant/vesta:/home/admin/web/ -p 8000:8000 -p 80:80 -p 443:443 -p 2222:22 -p 21:21 -p 8083:8083 ubuntu-upstart
# find state and id of the container, copy CONTAINER_ID

Code: Select all

docker ps -a
# move into the ubuntu container

Code: Select all

docker exec -it CONTAINER_NAME /bin/bash
#here update, upgrade, install curl and Vesta

Code: Select all

apt-get update && apt-get -y upgrade
apt-get -y install curl
curl -O http://vestacp.com/pub/vst-install.sh
bash vst-install.sh
# after ~ 15 min

Code: Select all

=======================================================


 _|      _|  _|_|_|_|    _|_|_|  _|_|_|_|_|    _|_|
 _|      _|  _|        _|            _|      _|    _|
 _|      _|  _|_|_|      _|_|        _|      _|_|_|_|
   _|  _|    _|              _|      _|      _|    _|
     _|      _|_|_|_|  _|_|_|        _|      _|    _|


-------------------------------
  https://your.ip:8083
  username: admin
  password: HuwVGtsdLq
-------------------------------


Congratulations,
you have successfully installed Vesta Control Panel.
# now move outside of the container to make a commit of this (YOUR OWN COPY)

Code: Select all

exit
docker ps -a
docker commit CONTAINER_ID my-name-of-the-container
# check if the image of your container was created, name, size, etc:

Code: Select all

docker images
To here all work like a charm but when I restart the server, some services don't restart and don't know the way to full run Vesta again, here the capture whit the services down... I some one know how full build an auto upstart Vesta, please let me know.

Impossible restart from the admin panel and if i tried from inside of the server:

nginx

Code: Select all

root@ac8a9e87adc4:/# service nginx restart
 * Restarting nginx nginx
nginx: [emerg] bind() to 172.17.0.13:80 failed (99: Cannot assign requested address)
nginx: configuration file /etc/nginx/nginx.conf test failed
apache2

Code: Select all

root@ac8a9e87adc4:/# service apache2 restart
 * Restarting web server apache2
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/conf.d/172.17.0.13.conf:1
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
(99)Cannot assign requested address: AH00072: make_sock: could not bind to address 172.17.0.13:8080
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
   ...fail!
 * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
cron

Code: Select all

root@ac8a9e87adc4:/# service cron start
start: Job failed to start
Image

Re: Successful Dockerize Vesta but...

Posted: Wed May 06, 2015 2:18 pm
by skurudo
Main problem it's ip change, correct?

May be this will help - viewtopic.php?f=10&t=5975

Re: Successful Dockerize Vesta but...

Posted: Fri Jul 31, 2015 7:39 pm
by Igvard
I have another problem. Then I just install Vesta to Docker's container the cron, iptables and file2ban doesn't starts from the beginning. May be it's need to start Docker container with additional flags? Does somebody known? Thanks.

Re: Successful Dockerize Vesta but...

Posted: Fri Aug 14, 2015 4:11 pm
by skurudo
Igvard wrote:I have another problem. Then I just install Vesta to Docker's container the cron, iptables and file2ban doesn't starts from the beginning. May be it's need to start Docker container with additional flags? Does somebody known? Thanks.
Yep, there is no way to normal dockerize... if someone find a way, this will be great.

Re: Successful Dockerize Vesta but...

Posted: Sat Jan 16, 2016 5:11 pm
by wisest
I created the image. https://github.com/lagun4ik/dockerizedVestaCP
(its not true docker way)

Re: Successful Dockerize Vesta but...

Posted: Sun Jan 17, 2016 3:05 pm
by skurudo
wisest wrote:I created the image. https://github.com/lagun4ik/dockerizedVestaCP
(its not true docker way)
Nice!
If I correct it's ubuntu only?