You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The puppet module turns some underscores in container names into dashes - which is ok ... but
this causes trouble when linking containers:
Mär 07 21:02:25 localhost.localdomain docker[8864]: docker: Error response from daemon: Could not get container for my_mysql.
(note the undercore...)
Seems that the linked containers' underscores are not converted to dashes and docker therefore cannot find them...
test case:
#Set up a stupid Wordpress instance...#https://github.com/garethr/garethr-dockerinclude'docker'#images#https://hub.docker.com/_/wordpress/docker::image{'wordpress':}#https://hub.docker.com/_/mysql/docker::image{'mysql':}#containersdocker::run{'my_mysql':
image=>'mysql',env=>['MYSQL_ROOT_PASSWORD=wordpress'],}docker::run{'my_wordpress':
image=>'wordpress',links=>['my_mysql:mysql'],ports=>['8080:80'],expose=>['80'],depends=>['my_mysql'],}
(just :%s/my_/my/g to make it work....)
Here's the unit file:
# This file is managed by Puppet and local changes# may be overwritten[Unit]Description=Daemon for my_wordpress
After=docker.service docker-my-mysql.service
Wants=
Requires=docker.service docker-my-mysql.service
[Service]Restart=on-failure
StartLimitInterval=20
StartLimitBurst=5
TimeoutStartSec=0
Environment="HOME=/root"ExecStartPre=-/usr/bin/docker kill my-wordpress
ExecStartPre=-/usr/bin/docker rm my-wordpress
ExecStart=/usr/bin/docker run \
--net bridge -m 0b --expose=80 --link my_mysql:mysql -p 8080:80 \# my-mysql!
--name my-wordpress \
wordpress \
ExecStop=-/usr/bin/docker kill my-wordpress
ExecStop=-/usr/bin/docker rm my-wordpress
[Install]WantedBy=multi-user.target
regards,
Björn
The text was updated successfully, but these errors were encountered:
The puppet module turns some underscores in container names into dashes - which is ok ... but
this causes trouble when linking containers:
Mär 07 21:02:25 localhost.localdomain docker[8864]: docker: Error response from daemon: Could not get container for my_mysql.
(note the undercore...)
Seems that the linked containers' underscores are not converted to dashes and docker therefore cannot find them...
test case:
(just :%s/my_/my/g to make it work....)
Here's the unit file:
regards,
Björn
The text was updated successfully, but these errors were encountered: