docker [Réglé]
un seul conteneur plusieurs processus
Logiciels / Autres logiciels

jb1 Membre non connecté
-
- Voir le profil du membre jb1
- Inscrit le : 15/11/2012
j'ai des petits ennuis:
Code :
Installé :
docker-compose.noarch 1.13.0-2.mga6 python-backports.x86_64 1.0-5.mga6
python-backports-ssl_match_hostname.noarch 3.5.0.1-1.mga6 python-cached-property.noarch 1.3.0-1.mga6
python-chardet.noarch 2.3.0-3.mga6 python-colorama.noarch 0.3.9-1.mga6
python-docker.noarch 2.2.1-2.mga6 python-docker-pycreds.noarch 0.2.1-1.mga6
python-dockerpty.noarch 0.4.1-1.mga6 python-docopt.noarch 0.6.2-2.mga6
python-enum34.noarch 1.0.4-2.mga6 python-ipaddress.noarch 1.0.16-1.mga6
python-jsonschema.noarch 2.5.1-2.mga6 python-pkg-resources.noarch 19.6.2-1.mga6
python-repoze-lru.noarch 0.6-1.mga6 python-requests.noarch 2.11.1-2.mga6
python-setuptools.noarch 19.6.2-1.mga6 python-texttable.noarch 0.8.1-2.mga6
python-urllib3.noarch 1.18.1-1.mga6 python-websocket-client.noarch 0.34.0-2.mga6
python-yaml.x86_64 3.10-13.mga6
Terminé !
[root@alpha30 ~]# docker-compose up
ERROR:
Can't find a suitable configuration file in this directory or any
parent. Are you in the right directory?
Supported filenames: docker-compose.yml, docker-compose.yaml
[root@alpha30
vous voyez une solution?

magnux77 Membre non connecté
-
- Voir le profil du membre magnux77
- Inscrit le : 21/09/2009
- Groupes :
-
Membre d'Honneur
Je précise que je ne connais pas docker. Plus précisément, seulement de nom, et par sa fonctionnalité, mais vue d'avion.
Mais à partir de ton message, je me demande si tu le connais mieux que moi. Car les messages sont limpides. Et l'/]overview[/url] de la commande compose indique que c'est un 3-steps process
Using Compose is basically a three-step process.
Define your app’s environment with a Dockerfile so it can be reproduced anywhere.
Define the services that make up your app in docker-compose.yml so they can be run together in an isolated environment.
Lastly, run docker-compose up and Compose will start and run your entire app.
Or je ne vois aucune création de définition d'environnement ou de service entre ta fin d'install et ton "up" sans paramètres.Define your app’s environment with a Dockerfile so it can be reproduced anywhere.
Define the services that make up your app in docker-compose.yml so they can be run together in an isolated environment.
Lastly, run docker-compose up and Compose will start and run your entire app.
...depuis Mandrake 7
Membre de l'April - « promouvoir et défendre le Logiciel Libre»
Soutien Framasoft - « Changer le monde, un octet à la fois»
Config n°1 : cpu=AMD64x6 mem=16G SSD=64G HDD=1T OS=Mageia8-64 DE=Xfce, Config n°2 : Dell Latitude E6410 SSD=120G OS=Mageia8 DE=Xfce, Config n°3 : ThinkpadR40 SSD=32G OS=[Manjaro, Parabola, Mageia6] DE=Xfce, Config n°4 : EeePC901 SSD=20Gb, OS=[SliTaz5/Lxde, Mageia8/Xfce]
Membre de l'April - « promouvoir et défendre le Logiciel Libre»
Soutien Framasoft - « Changer le monde, un octet à la fois»
Config n°1 : cpu=AMD64x6 mem=16G SSD=64G HDD=1T OS=Mageia8-64 DE=Xfce, Config n°2 : Dell Latitude E6410 SSD=120G OS=Mageia8 DE=Xfce, Config n°3 : ThinkpadR40 SSD=32G OS=[Manjaro, Parabola, Mageia6] DE=Xfce, Config n°4 : EeePC901 SSD=20Gb, OS=[SliTaz5/Lxde, Mageia8/Xfce]

vouf Membre non connecté
-
- Voir le profil du membre vouf
- Inscrit le : 16/08/2008
- Groupes :
As tu installé docker avant ? Je pense que c'est nécessaire vu le nom du paquet. Ensuite, Il faut démarrer le service docker ou faire un reboot pour que ça fonctionne
Si l'on veut que son utilisateur est un accès à docker, il faut l'ajouter au groupe docker. Mais vu que tu travailles avec root....
Si tu rencontre des soucis de communication avec les images docker, penser à couper le firewall.
Mageia 9 64 bits Plasma - Asus Prime Z690-P D4 -Intel Core i5 12600 K- 32 Go Kingston Fury Renegade DDR4-3600 Mhz- Gigabyte Nvidia RTX 3060 - Go-M2 Samsung Evo 970 1Tb-SSD 512 Gb Samsung Evo 960 -SSD 512 Gb Crucial M5

jb1 Membre non connecté
-
- Voir le profil du membre jb1
- Inscrit le : 15/11/2012
tout d'abord merci pour vos réponses,
docker tourne chez moi sur Debian, Fedora OpenSUSE, Ubuntu, Windows 10 Familial
mais les conteneurs en mono processsus dans une image,
donc le but, multi processus dans une image exemple réalisé sous Fedora (nginx, php, MariaDB)
je pense qu'il n'est pas necessaire de rebooter (comme sur les autres Linux)
l'installation de docker, comme sur F27: dnf install docker
pour les paramètres d'environnement je vais les inclures
merci
A+
JB1

jb1 Membre non connecté
-
- Voir le profil du membre jb1
- Inscrit le : 15/11/2012
mais "il" ne me rend pas la maiin
j'ai vu des articles interessants
Code :
oot@a411dda6fd4b:/# ps -aedfl
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
4 S root 1 0 0 80 0 - 5463 wait 11:26 pts/0 00:00:00 /bin/bash
0 R root 16 1 0 80 0 - 4775 - 13:00 pts/0 00:00:00 ps -aedfl
root@a411dda6fd4b:/# pg run.sh
#!/bin/bash
# Mysql
VOLUME_HOME="/var/lib/mysql"
sed -ri -e "s/^upload_max_filesize.*/upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}/" \
-e "s/^post_max_size.*/post_max_size = ${PHP_POST_MAX_SIZE}/" \
-e "s/^memory_limit.*/memory_limit = ${PHP_MEMORY_LIMIT}/" /etc/php/7.1/apache2/php.ini
# install db
if [[ ! -d $VOLUME_HOME/mysql ]]; then
echo "=> An empty or uninitialized MySQL volume is detected in $VOLUME_HOME"
echo "=> Installing MySQL ..."
mysql_install_db > /dev/null 2>&1
echo "=> Done!"
/create_mysql_admin_user.sh
else
echo "=> Using an existing volume of MySQL"
fi
# Create sample site (site.loc)
echo "========================================================================"
echo "SITE_SAMPLE : "
if [ -z "${SITE_SAMPLE}" ]
then
echo "No env var SITE_SAMPLE in docker run command. Do nothing."
else
if [ "${SITE_SAMPLE}" = "create" ]
then
echo '<VirtualHost *:80>
ServerName site.loc
DocumentRoot /data/lamp/www/site/htdocs
AddType application/x-httpd-php .php
DirectoryIndex index.php
CustomLog /data/lamp/www/site/log/request.log combined
KeepAlive Off
<Directory /data/lamp/www/site/htdocs>
Options +FollowSymLinks +ExecCGI
</Directory>
</VirtualHost>' > /data/lamp/conf/httpd-site.conf;
mkdir /data/lamp/www/site;
mkdir /data/lamp/www/site/htdocs;
mkdir /data/lamp/www/site/log;
echo '<h1>Hello site.loc</h1>' > /data/lamp/www/site/htdocs/index.php;
else
rm -f /data/lamp/conf/httpd-site.conf;
rm -Rf /data/lamp/www/site;
fi
fi
# supervisord
echo "========================================================================"
echo "Supervisord launchs: "
exec supervisord -n -c /etc/supervisor/supervisord.conf
root@a411dda6fd4b:/# ./run.sh
=> An empty or uninitialized MySQL volume is detected in /var/lib/mysql
=> Installing MySQL ...
=> Done!
=> Waiting for confirmation of MySQL service startup
=> Creating MySQL admin user with default password
=> Done!
========================================================================
You can now connect to this MySQL Server using:
mysql -uadmin -padmin -h<host> -P<port>
MySQL user 'admin' has password 'admin'
MySQL user 'root' has password 'root' but only allows local connections
========================================================================
MYSQL_PERSIST_BY_CRON :
No env var MYSQL_PERSIST_BY_CRON in docker run command. Do nothing.
========================================================================
SITE_SAMPLE :
No env var SITE_SAMPLE in docker run command. Do nothing.
========================================================================
Supervisord launchs:
2017-08-09 13:02:49,518 CRIT Supervisor running as root (no user in config file)
2017-08-09 13:02:49,518 WARN Included extra file "/etc/supervisor/conf.d/supervisord-mysqld.conf" during parsing
2017-08-09 13:02:49,518 WARN Included extra file "/etc/supervisor/conf.d/supervisord-apache2.conf" during parsing
2017-08-09 13:02:49,532 INFO RPC interface 'supervisor' initialized
2017-08-09 13:02:49,532 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2017-08-09 13:02:49,533 INFO supervisord started with pid 18
2017-08-09 13:02:50,535 INFO spawned: 'mysqld' with pid 678
2017-08-09 13:02:50,536 INFO spawned: 'apache2' with pid 679
2017-08-09 13:02:51,917 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-08-09 13:02:51,917 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
^C2017-08-09 14:00:54,928 WARN received SIGINT indicating exit request
2017-08-09 14:00:54,928 INFO waiting for mysqld, apache2 to die
2017-08-09 14:00:55,033 INFO stopped: apache2 (exit status 0)
2017-08-09 14:00:58,037 INFO waiting for mysqld to die
2017-08-09 14:01:01,041 INFO waiting for mysqld to die
2017-08-09 14:01:04,044 INFO waiting for mysqld to die
2017-08-09 14:01:05,046 WARN killing 'mysqld' (678) with SIGKILL
2017-08-09 14:01:05,046 INFO stopped: mysqld (terminated by SIGKILL)
root@a411dda6fd4b:/# mysql -uadmin -padmin
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.55-0+deb8u1-log (Debian)
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

jb1 Membre non connecté
-
- Voir le profil du membre jb1
- Inscrit le : 15/11/2012
root@02eed0b34e29:/# ps -aedfl
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
4 S root 1 0 0 80 0 - 5463 wait 14:05 pts/0 00:00:00 /bin/bash
0 S root 687 1 0 80 0 - 12225 poll_s 17:00 pts/0 00:00:00 /usr/bin/python /usr/bin/supervisord -n -c /etc/supervisor/supervisor
4 S root 690 687 0 80 0 - 1084 wait 17:00 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe
4 S root 691 687 0 80 0 - 134250 poll_s 17:00 pts/0 00:00:00 apache2 -D FOREGROUND
5 S www-data 915 691 0 80 0 - 134258 - 17:00 pts/0 00:00:00 apache2 -D FOREGROUND
5 S www-data 916 691 0 80 0 - 134258 - 17:00 pts/0 00:00:00 apache2 -D FOREGROUND
5 S www-data 920 691 0 80 0 - 134258 - 17:00 pts/0 00:00:00 apache2 -D FOREGROUND
5 S www-data 921 691 0 80 0 - 134258 - 17:00 pts/0 00:00:00 apache2 -D FOREGROUND
5 S www-data 924 691 0 80 0 - 134258 - 17:00 pts/0 00:00:00 apache2 -D FOREGROUND
4 S mysql 1279 690 0 80 0 - 125157 - 17:00 pts/0 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir
0 R root 1297 1 0 80 0 - 4775 - 17:00 pts/0 00:00:00 ps -aedfl
root@02eed0b34e29:/#
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie