RobLoach / Dockie

:whale: Collection of Modern Development Environments for Docker
https://registry.hub.docker.com/repos/dockie/
Other
50 stars 18 forks source link

Error : LAMP /mysql-setup.sh: Text file busy while building #37

Closed tigitz closed 6 years ago

tigitz commented 8 years ago

Hello,

Have you tried building the lamp container lately ?

I have an error

Get:3 http://archive.ubuntu.com/ubuntu/ wily/main libhtml-template-perl all 2.95-2 [60.4 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ wily-updates/main mysql-server all 5.6.27-0ubuntu1 [8804 B]
Preconfiguring packages ...
Fetched 10.4 MB in 9s (1062 kB/s)
Selecting previously unselected package mysql-server-core-5.6.
(Reading database ... 49806 files and directories currently installed.)
Preparing to unpack .../mysql-server-core-5.6_5.6.27-0ubuntu1_amd64.deb ...
Unpacking mysql-server-core-5.6 (5.6.27-0ubuntu1) ...
Selecting previously unselected package mysql-server-5.6.
Preparing to unpack .../mysql-server-5.6_5.6.27-0ubuntu1_amd64.deb ...
Unpacking mysql-server-5.6 (5.6.27-0ubuntu1) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../libhtml-template-perl_2.95-2_all.deb ...
Unpacking libhtml-template-perl (2.95-2) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.6.27-0ubuntu1_all.deb ...
Unpacking mysql-server (5.6.27-0ubuntu1) ...
Processing triggers for systemd (225-1ubuntu9) ...
Setting up mysql-server-core-5.6 (5.6.27-0ubuntu1) ...
Setting up mysql-server-5.6 (5.6.27-0ubuntu1) ...
invoke-rc.d: policy-rc.d denied execution of stop.
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
invoke-rc.d: policy-rc.d denied execution of start.
Setting up libhtml-template-perl (2.95-2) ...
Setting up mysql-server (5.6.27-0ubuntu1) ...
Processing triggers for systemd (225-1ubuntu9) ...
/bin/sh: 1: /mysql-setup.sh: Text file busy

I managed to fix it by using sync like this chmod +x /*.sh; sync && \ /mysql-setup.sh

But in the end it seems that mysql isn't loading :

Setting up mysql-server-5.6 (5.6.27-0ubuntu1) ...
invoke-rc.d: policy-rc.d denied execution of stop.
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
invoke-rc.d: policy-rc.d denied execution of start.
Setting up libhtml-template-perl (2.95-2) ...
Setting up mysql-server (5.6.27-0ubuntu1) ...
Processing triggers for systemd (225-1ubuntu9) ...
 ---> Waiting for MySQL
 ---> Waiting for MySQL
 ---> Waiting for MySQL
 ---> Waiting for MySQL
RobLoach commented 8 years ago

I've been running into similar issues with MySQL. I believe mysql-setup.sh needs some tweaking.

Have you found a way around it? I've been using docker-compose as an alternative to keep the service separate from the application. But, it would be good to fix this one.

tigitz commented 8 years ago

Not yet unfortunately, I didn't spend much time on it though.

As I agree `docker-compose is the best parctice to follow, I like the flexibility of firing a single container with everything in it for each projects. Also it's less complicated as an introduction to docker for juniors in my team.

Let me know if you have any clue on what could be the problem here.