Open marcbria opened 5 years ago
Hi @marcbria, at the time this Dockerfile was created, probably Debian Jessie was "latest". Considering that Debian Buster (current "latest") introduced a lot of breaking changes, I'd suggest you to try with FROM debian:jessie
.
We might include a docker-compose.yml file altogether with a brand new Dockerfile some time in the future. However, it's unclear for us if it will be in the docker hub.
Regards.
hi @PeGa tried with FROM debian:jessie
but there is an error at starting mysqld:
Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed! The command '/bin/sh -c apt-get install php5 php5-mysql git wget curl php5-curl php5-intl phpunit vim -y && /etc/init.d/mysql start && echo "CREATE DATABASE timegrid_dev CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL ON timegrid_dev.* TO 'timegrid_dev'@localhost IDENTIFIED BY 'tgpass';" | mysql -pr00t && echo "CREATE DATABASE testing_timegrid CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL ON testing_timegrid.* TO 'testing_timegrid'@localhost IDENTIFIED BY 'testing_timegrid';" | mysql -pr00t && /etc/init.d/mysql stop' returned a non-zero code: 1
Can you help? Ty very much.
Image on hub.docker would be great :D
Seeded: NotifynderCategoriesSeeder
Seeded the Notifynder Categories!
Seeded: CategoriesSeeder
Seeded the Param Categories!
Seeded: CountriesSeeder
Seeded the Param Countries!
Seeded: RolesTableSeeder
Seeded the Param Roles!
Updating...
[ErrorException]
get_headers(): php_network_getaddresses: getaddrinfo failed: Name or service not known
The command '/bin/sh -c /etc/init.d/mysql start && php artisan migrate --seed --database=testing && php artisan key:generate && php artisan migrate && php artisan db:seed && php artisan geoip:update && /etc/init.d/mysql stop' returned a non-zero code: 1
I edited debian:latest -> debian:jessie and having this problem. Maybe php in docker requires some thing more?
This is not the answer for your question, but I can manage to have the service start and running.
RUN /etc/init.d/mysql start && \
php artisan migrate --seed --database=testing && \
php artisan key:generate && \
php artisan migrate && \
php artisan db:seed && \
php artisan geoip:update && \
/etc/init.d/mysql stop
CMD /etc/init.d/mysql start && tail -f /dev/null
3. Build docker image:
outside docker $> sudo docker build -t timegrid --build-arg user=$(whoami) --build-arg uid=$(id -u) .
4. Run docker image with -it:
outside docker $> sudo docker run -it -p 8000:8000 timegrid:latest /bin/bash
5. Finish what you have commented out:
inside docker $> /etc/init.d/mysql start && php artisan migrate --seed --database=testing && php artisan key:generate && php artisan migrate && php artisan db:seed && php artisan serve --host 0.0.0.0
6. Profit
@minhtt159 Your guide is nice, thank you.
I pinned the issue further down to the php artisan geoip:update && \
line. Yet I have no clue why it fails. Any Suggestions?
@minhtt159 Your guide is nice, thank you.
I pinned the issue further down to the
php artisan geoip:update && \
line. Yet I have no clue why it fails. Any Suggestions?
I believe that mysql server must run "all the time", also "in a different container". You can not start mysql server in the docker image. It doesn't work like that. You can design a mechanism that when docker container is starting, run the script that start mysql server and create database.
Dockerfile fails to install mysql-server:
BTW, why not including the project in dockerhub? Are you planning to release a docker-compose?
Thanks for your work, m.