jerob / docker-ispconfig Goto Github PK
View Code? Open in Web Editor NEWDockerfile for ISPConfig with MariaDB database
Dockerfile for ISPConfig with MariaDB database
Hi, good work with the docker ispconfig image. I would like to know something about the maintenance. Do you plan to maintain the project in future too?
Best regards
The Docker file contains the next volumes: "/var/www/","/var/mail/","/var/backup/","/var/lib/mysql","/var/log/"
You have to add the following to, to make the installation script recognize an existing installation, and skip the installation of everything during the restarts of the container:
volumes:
- ispconfig_usr:/usr/local/
- ispconfig_etc:/etc/
Note that bind mounts won't work as they don't copy the existing data to the host folder!
So with the following volumes, ISPConfig seems to survive restarts of the container/service:
version: '3'
services:
ispconfig:
container_name: ispconfig
hostname: YOUR.DOMAIN.COM
restart: unless-stopped
image: jerob/docker-ispconfig
volumes:
- ispconfig_www:/var/www/
- ispconfig_mail:/var/mail/
- ispconfig_backup:/var/backup/
- ispconfig_mysql:/var/lib/mysql/
- ispconfig_log:/var/log/
- ispconfig_usr:/usr/local/
- ispconfig_etc:/etc/
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- MAILMAN_EMAIL_HOST=YOURMAIL.DOMAIN.COM
- [email protected]
- MAILMAN_PASS=pass
network_mode: bridge
ports:
- "20:20"
- "21:21"
- "30000-30009:30000-30009"
- "80:80"
- "444:443"
- "8080:8080"
- "53:53"
- "22:22"
volumes:
ispconfig_www:
ispconfig_mail:
ispconfig_mysql:
ispconfig_log:
ispconfig_backup:
ispconfig_usr:
ispconfig_etc:
I use your Docker container in a Docker Swarm as a service that is deployed a single time.
If I deploy the ISPConfig service for the first time, everything is ok. If i redeploy the service, the container breaks (well, ISPConfig breaks):
"ERROR: Stopped: Database already contains some tables.,".
As if ISPConfig thinks I'm building a multiserver environment.
https://www.howtoforge.com/community/threads/error-stopped-database-already-contains-some-tables.77574/
Is it because /usr/local/ispconfig is not persisted, ie is empty, BUT the ispconfig database is already there in the mysql database??
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...,
2019-06-01 17:26:09 139701624802688 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 30 ...,
OK,
Filling help tables...,
2019-06-01 17:26:12 140665441004928 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 61 ...,
OK,
Creating OpenGIS required SP-s...,
2019-06-01 17:26:15 139898439572864 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 90 ...,
OK,
,
To start mysqld at boot time you have to copy,
support-files/mysql.server to the right place for your system,
,
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !,
To do so, start the server, then issue the following commands:,
,
'/usr/bin/mysqladmin' -u root password 'new-password',
'/usr/bin/mysqladmin' -u root -h ares.zoefdehaas.com password 'new-password',
,
ternatively you can run:,
'/usr/bin/mysql_secure_installation',
,
which will also give you the option of removing the test,
databases and anonymous user created by default. This is,
strongly recommended for production servers.,
,
See the MariaDB Knowledgebase at http://mariadb.com/kb or the,
MySQL manual for more instructions.,
,
You can start the MariaDB daemon with:,
cd '/usr' ; /usr/bin/mysqld_safe --datadir='/var/lib/mysql',
,
You can test the MariaDB daemon with mysql-test-run.pl,
cd '/usr/mysql-test' ; perl mysql-test-run.pl,
,
Please report any problems at http://mariadb.org/jira,
,
The latest information about MariaDB is available at http://mariadb.org/.,
You can find additional information about the MySQL part at:,
http://dev.mysql.com,
Consider joining MariaDB's strong and vibrant community:,
https://mariadb.org/get-involved/,
,
Starting MariaDB database server: mysqld.,
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO),
Starting MariaDB database server: mysqld already running.,
,
,
--------------------------------------------------------------------------------,
_____ ___________ _____ __ _ ____,
|_ _/ ___| ___ \ / __ \ / _(_) /__ \,
| | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ /,
| | `--. \ __/ | | / _ \| '_ \| _| |/ _` | |_ |,
_| |_/\__/ / | | \__/\ (_) | | | | | | | (_| | ___\ \,
\___/\____/\_| \____/\___/|_| |_|_| |_|\__, | \____/,
__/ |,
|___/ ,
--------------------------------------------------------------------------------,
,
,
Initial configuration ,
,
Operating System: Debian 9.0 (Stretch) or compatible,
,
Following will be a few questions for primary configuration so be careful.,
Default values are in [brackets] and can be accepted with <ENTER>.,
Tap in "quit" (without the quotes) to stop the installer.,
,
,
,
,
,
,
,
,
,
,
,
ERROR: Stopped: Database already contains some tables.,
mkdir: cannot create directory '/var/www/html': File exists,
_,met$$$$$gg. @ares.zoefdehaas.com,
,g$$$$$$$$$$$$$$$P. OS: Debian 9.8 stretch,
,g$$P"" """Y$$.". Kernel: x86_64 Linux 4.15.0-50-generic,
,$$P' `$$$. Uptime: 2d 56m,
',$$P ,ggs. `$$b: Packages: 739,
`d$$' ,$P"' . $$$ Shell: start.sh,
$$P d$' , $$P CPU: Intel Celeron CPU J3455 @ 2.3GHz,
$$: $$. - ,d$$' RAM: 1932MiB / 7826MiB,
$$\; Y$b._ _,d$P' ,
Y$$. `.`"Y$$$$P"' ,
`$$b "-.__ ,
`Y$$ ,
`Y$$. ,
`$$b. ,
`Y$$b. ,
`"Y$b._ ,
`"""" ,
,
2019-06-01 17:26:21,970 CRIT Set uid to user 0,
``
There is a syntax error in the debconf preseed command; the following patch snippet should help.
-RUN echo 'mailman mailman/default_server_language en' | debconf-set-selections
+RUN echo 'mailman mailman/default_server_language select en' | debconf-set-selections
I'll work at getting proper MR for this soonish.
Hello,
I can access :8080 but :80 and :433 returns blank page. after multiple refresh sometimes i get error 503 page.
Ruining latest version
I can not access admin area after login with admin/admin.
the password seems correct but it does not redirect me to admin area
Dear
according to your command in docker hub as below
i dont see any port mapping for 110 and 143 or 995 and 993 .
that is why when it is running it can not be listen in host
docker run --name ispconfig
-e MAILMAN_EMAIL_HOST=test.com
-e MAILMAN_EMAIL=[email protected]
-e MAILMAN_PASS=pass
-d
-v $(pwd)/mysql:/var/lib/mysql
-v $(pwd)/www:/var/www
-v $(pwd)/mail:/var/mail
-p 20:20
-p 21:21
-p 30000-30009:30000-30009
-p 80:80
-p 443:443
-p 8080:8080
-p 53:53
-p 2222:22
jerob/docker-ispconfig /start.sh
FYI,
I recently tried to use this repo as a base to get some more CI testing in ISPconfig.
See my work in progress MR
Feedback and collaboration would be very welcome.
Hello,
When I do the command where is on docker repo and I remove -d for see verbose, I have this error : can't read /tmp/ispconfig3_install/install/autoinstall.ini: No such file or directory
How can i fix this error ?
Edit : I forgot to delete everything (volume, image, container) to reset the installation.
Containers started by docker have the same time./clock as the host, and the container can not change the time. If the time is off, it must be fixed in the host.
So, step 7 is somewhat pointless.
It would be fine to have roundcube as web mail client instead of Squirremail.
Hello, its second time when we noticed that mysql database inside this container were hacked. All data has been lost, one database were created with name "PLEASE_READ_ME_XMG" and with content:
MariaDB [PLEASE_READ_ME_XMG]> select * from WARNING;
+----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------+------------------------+
| id | warning | Bitcoin_Address | Email |
+----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------+------------------------+
| 1 | To recover your lost data : Send 0.045 BTC to our BitCoin Address and Contact us by eMail with your server IP Address or Domain Name and a Proof of Payment. Any eMail without your server IP Address or Domain Name and a Proof of Payment together will be ignored. Your File and DataBase is downloaded and backed up on our servers. If we dont receive your payment,we will delete your databases. | 1666666vT5Y5bPXPAk4jWqJ9Gr26SLFq8P | [email protected] |
+----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------+------------------------+
I try to investigate this problem but Im not able to identify how this happened. I did not find any more affected data, just mysql data is lost.
Any ideas?
Docker version 17.12.0-ce, build c97c6d6
I get this error message :
unauthorized: authentication required
There are several instances of the following pattern in the Dockerfile:
"RUN service postfix restart"
During Dockerfile build, each and every RUN command starts a completely fresh container, does the RUN, then stops the container. So the action of stop/start/restart only added additional layers, and slows down the build.
When I run the "docker run" command I get back the following error message:
Error response from daemon: driver failed programming external connectivity on endpoint ispconfig (b0b51609f81e996386cab780dc66595778d391d59f065469d7068162df5ceba9): Error starting userland proxy: listen tcp 0.0.0.0:53: bind: address already in use.
08.03.2017-17:30 - DEBUG - Restarting httpd: systemctl restart apache2.service
08.03.2017-17:30 - DEBUG - Apache restart return value is: 127
08.03.2017-17:30 - DEBUG - Apache online status after restart is: running
08.03.2017-17:30 - WARNING - Apache did not restart after the configuration change for website stanley.ispconfig. Reverting the configuration. Saved non-working config as /etc/apache2/sites-available/XXXX.vhost.err
08.03.2017-17:30 - WARNING - Reason for Apache restart failure: /bin/systemctl: line 4: /etc/init.d/apache2.service: No such file or directory
08.03.2017-17:30 - DEBUG - Calling function 'restartHttpd' from module 'web_module'.
Testing this image but no idea about the SSH username and password
Any idea?
autoinstall.ini does not set some values that the install.php script prompts for. The reason this wasn't detected, is that docker-build sets stdin = /dev/null, and install.php picks a sensible default.
Setting the values implicitly, however, makes this a bit easier to understand.
The options needed are:
mysql_port=3306
ispconfig_admin_password=admin
Hi there,
is there any plan to add additional PHP version into ISPConfig ready to be used ?
i dont think it is possible to add multiple php versions in Jailkit so 7.2.x+ would be good to have .
thinking for Laravel Developments , seems Jailkit dont yet have Composer and Artisan support ? i think it can be done via Ispconfig's panel in the settings but will be good to have it ready in image so there is no struggle with it ..
Can you verify if creating an image still works (using ISPconfig 3.1)? Thanks!
Hello,
first: Great work, jerob!!! ๐
I've the following problem:
I want to make sure that even after deleting the container it is still possible to restart the container with the existing volumes (data).
Obviously the container starts, but the service for ISPConfig is not started on port 8080. (Checked with netstat -tlupen).
To start the new container i've used the follwoing command (same as first creation of the container - without -e params):
docker run --name ispconfig \ -d \ -v ispconfig_mysql:/var/lib/mysql \ -v ispconfig_www:/var/www \ -v ispconfig_mail:/var/mail \ -p 30000-30009:30000-30009 \ -p 8080:8080 \ -p 53:53 \ -p 2222:22 \ jerob/docker-ispconfig /start.sh
Please can you tell me: What is the (correct) way to start a docker-ispconfig container with existing data?
Thanks for your reply.
Greeting, FrTj25
Hello,
Just wanted to note that the container by default has the crontab -e file empty (not sure if this is normal). I ended up manually adding the following to the crontab:
Alternatively, I just updated using the following command:
ispconfig_update.sh
and the update wizard asked if I wanted it to reconfigure the crons and sure enough, it fixed the crontab file with the proper values (it was working with the method above, but with the new settings from the update it still works so no problem).
Hopefully this will help someone.
10:41:07 -0600 adam@XXXX:~$ docker exec -ti ispconfig_ispconfig_1 ls -l /bin/systemctl
-rw-r--r-- 1 root root 218 Sep 3 2015 /bin/systemctl
I get this error during the build process:
Errors were encountered while processing: /var/cache/apt/archives/mariadb-server-10.0_10.0.16-1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) 2015/07/03 20:48:28 The command [/bin/sh -c apt-get -y install postfix postfix-mysql postfix-doc mariadb-client mariadb-server openssl getmail4 rkhunter binutils dovecot-imapd dovecot-pop3d dovecot-mysql dovecot-sieve dovecot-lmtpd sudo] returned a non-zero code: 100
Yo, just fresh installed, set variables for paths, forwarded 8080 port and accessed br0ed ip via 8080
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.