Puppet not showing docker running server
up vote
0
down vote
favorite
I am trying puppet to run a docker container. I am using puppetlabs docker module. Everything is working fine but the run command is not working, despite everything is fine in puppet log and shows running.
==> default: Running Puppet with default.pp...
==> default: Notice: Compiled catalog for pustakalaya.vm.vm.local in environment production in 0.52 seconds
==> default: Notice: /Stage[main]/Pustakalaya::Installdocker/Exec[install docker]/returns: executed successfully
==> default: Notice: /Stage[main]/Docker::Repos/Apt::Source[docker]/Apt::Setting[list-docker]/File[/etc/apt/sources.list.d/docker.list]/content: content changed '{md5}c4955fdae0865aac860821ca9257f48b' to '{md5}395ee27d70d138f3f6bdf37acbbb5c4f'
==> default: Notice: /Stage[main]/Apt::Update/Exec[apt_update]: Triggered 'refresh' from 1 event
==> default: Notice: /Stage[main]/Pustakalaya::Installdocker/Service[docker]: Triggered 'refresh' from 1 event
==> default: Notice: /Stage[main]/Pustakalaya::Run/Docker::Run[nginx]/Service[docker-nginx]/ensure: ensure changed 'stopped' to 'running'
My puppet class is
docker::run { 'nginx':
image => 'nginx:latest',
detach => true,
ports => ['80:80'],
command => "/bin/bash"
}
EDIT solution
According to github.com/puppetlabs/puppetlabs-docker/issues/313 On an os using systemd you don't need the detatch => true param set. If you remove it the example you've provide will run without any issues
docker puppet
add a comment |
up vote
0
down vote
favorite
I am trying puppet to run a docker container. I am using puppetlabs docker module. Everything is working fine but the run command is not working, despite everything is fine in puppet log and shows running.
==> default: Running Puppet with default.pp...
==> default: Notice: Compiled catalog for pustakalaya.vm.vm.local in environment production in 0.52 seconds
==> default: Notice: /Stage[main]/Pustakalaya::Installdocker/Exec[install docker]/returns: executed successfully
==> default: Notice: /Stage[main]/Docker::Repos/Apt::Source[docker]/Apt::Setting[list-docker]/File[/etc/apt/sources.list.d/docker.list]/content: content changed '{md5}c4955fdae0865aac860821ca9257f48b' to '{md5}395ee27d70d138f3f6bdf37acbbb5c4f'
==> default: Notice: /Stage[main]/Apt::Update/Exec[apt_update]: Triggered 'refresh' from 1 event
==> default: Notice: /Stage[main]/Pustakalaya::Installdocker/Service[docker]: Triggered 'refresh' from 1 event
==> default: Notice: /Stage[main]/Pustakalaya::Run/Docker::Run[nginx]/Service[docker-nginx]/ensure: ensure changed 'stopped' to 'running'
My puppet class is
docker::run { 'nginx':
image => 'nginx:latest',
detach => true,
ports => ['80:80'],
command => "/bin/bash"
}
EDIT solution
According to github.com/puppetlabs/puppetlabs-docker/issues/313 On an os using systemd you don't need the detatch => true param set. If you remove it the example you've provide will run without any issues
docker puppet
most likely you already have something listening on port 80 and this made the container die:docker ps -a
on the host and see if the container did indeed exit
– Uku Loskit
Nov 14 at 12:10
@UkuLoskit No, there is no any in docker ps -a. Also, port 80 is not used. when I try docker command it works
– Bikram
Nov 14 at 12:14
@Bikram, if you have found a solution yourself and would like to share it (thanks!) then the customary way to do so around here is to write and post an actual answer to the question. Editing the solution into the question is inconsistent with our model and conventions.
– John Bollinger
Nov 14 at 15:59
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying puppet to run a docker container. I am using puppetlabs docker module. Everything is working fine but the run command is not working, despite everything is fine in puppet log and shows running.
==> default: Running Puppet with default.pp...
==> default: Notice: Compiled catalog for pustakalaya.vm.vm.local in environment production in 0.52 seconds
==> default: Notice: /Stage[main]/Pustakalaya::Installdocker/Exec[install docker]/returns: executed successfully
==> default: Notice: /Stage[main]/Docker::Repos/Apt::Source[docker]/Apt::Setting[list-docker]/File[/etc/apt/sources.list.d/docker.list]/content: content changed '{md5}c4955fdae0865aac860821ca9257f48b' to '{md5}395ee27d70d138f3f6bdf37acbbb5c4f'
==> default: Notice: /Stage[main]/Apt::Update/Exec[apt_update]: Triggered 'refresh' from 1 event
==> default: Notice: /Stage[main]/Pustakalaya::Installdocker/Service[docker]: Triggered 'refresh' from 1 event
==> default: Notice: /Stage[main]/Pustakalaya::Run/Docker::Run[nginx]/Service[docker-nginx]/ensure: ensure changed 'stopped' to 'running'
My puppet class is
docker::run { 'nginx':
image => 'nginx:latest',
detach => true,
ports => ['80:80'],
command => "/bin/bash"
}
EDIT solution
According to github.com/puppetlabs/puppetlabs-docker/issues/313 On an os using systemd you don't need the detatch => true param set. If you remove it the example you've provide will run without any issues
docker puppet
I am trying puppet to run a docker container. I am using puppetlabs docker module. Everything is working fine but the run command is not working, despite everything is fine in puppet log and shows running.
==> default: Running Puppet with default.pp...
==> default: Notice: Compiled catalog for pustakalaya.vm.vm.local in environment production in 0.52 seconds
==> default: Notice: /Stage[main]/Pustakalaya::Installdocker/Exec[install docker]/returns: executed successfully
==> default: Notice: /Stage[main]/Docker::Repos/Apt::Source[docker]/Apt::Setting[list-docker]/File[/etc/apt/sources.list.d/docker.list]/content: content changed '{md5}c4955fdae0865aac860821ca9257f48b' to '{md5}395ee27d70d138f3f6bdf37acbbb5c4f'
==> default: Notice: /Stage[main]/Apt::Update/Exec[apt_update]: Triggered 'refresh' from 1 event
==> default: Notice: /Stage[main]/Pustakalaya::Installdocker/Service[docker]: Triggered 'refresh' from 1 event
==> default: Notice: /Stage[main]/Pustakalaya::Run/Docker::Run[nginx]/Service[docker-nginx]/ensure: ensure changed 'stopped' to 'running'
My puppet class is
docker::run { 'nginx':
image => 'nginx:latest',
detach => true,
ports => ['80:80'],
command => "/bin/bash"
}
EDIT solution
According to github.com/puppetlabs/puppetlabs-docker/issues/313 On an os using systemd you don't need the detatch => true param set. If you remove it the example you've provide will run without any issues
docker puppet
docker puppet
edited Nov 14 at 14:21
asked Nov 14 at 11:14
Bikram
113
113
most likely you already have something listening on port 80 and this made the container die:docker ps -a
on the host and see if the container did indeed exit
– Uku Loskit
Nov 14 at 12:10
@UkuLoskit No, there is no any in docker ps -a. Also, port 80 is not used. when I try docker command it works
– Bikram
Nov 14 at 12:14
@Bikram, if you have found a solution yourself and would like to share it (thanks!) then the customary way to do so around here is to write and post an actual answer to the question. Editing the solution into the question is inconsistent with our model and conventions.
– John Bollinger
Nov 14 at 15:59
add a comment |
most likely you already have something listening on port 80 and this made the container die:docker ps -a
on the host and see if the container did indeed exit
– Uku Loskit
Nov 14 at 12:10
@UkuLoskit No, there is no any in docker ps -a. Also, port 80 is not used. when I try docker command it works
– Bikram
Nov 14 at 12:14
@Bikram, if you have found a solution yourself and would like to share it (thanks!) then the customary way to do so around here is to write and post an actual answer to the question. Editing the solution into the question is inconsistent with our model and conventions.
– John Bollinger
Nov 14 at 15:59
most likely you already have something listening on port 80 and this made the container die:
docker ps -a
on the host and see if the container did indeed exit– Uku Loskit
Nov 14 at 12:10
most likely you already have something listening on port 80 and this made the container die:
docker ps -a
on the host and see if the container did indeed exit– Uku Loskit
Nov 14 at 12:10
@UkuLoskit No, there is no any in docker ps -a. Also, port 80 is not used. when I try docker command it works
– Bikram
Nov 14 at 12:14
@UkuLoskit No, there is no any in docker ps -a. Also, port 80 is not used. when I try docker command it works
– Bikram
Nov 14 at 12:14
@Bikram, if you have found a solution yourself and would like to share it (thanks!) then the customary way to do so around here is to write and post an actual answer to the question. Editing the solution into the question is inconsistent with our model and conventions.
– John Bollinger
Nov 14 at 15:59
@Bikram, if you have found a solution yourself and would like to share it (thanks!) then the customary way to do so around here is to write and post an actual answer to the question. Editing the solution into the question is inconsistent with our model and conventions.
– John Bollinger
Nov 14 at 15:59
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
The container lives for as long as the command you're running.
In your case it most likely runs a non-interactive call to bash successfully and exits with 0.
To keep the container running you'd want to pass the --interactive param to docker. Looking at the puppet docker docs it sounds like you can add extra_parameters => ['--interactive'],
to your docker::run.
I removed detach => true and it worked. I don't understand the issue here. But anyway thanks
– Bikram
Nov 14 at 12:53
According to github.com/puppetlabs/puppetlabs-docker/issues/313 On an os using systemd you don't need the detatch => true param set. If you remove it the example you've provide will run without any issues.
– Bikram
Nov 14 at 13:01
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
The container lives for as long as the command you're running.
In your case it most likely runs a non-interactive call to bash successfully and exits with 0.
To keep the container running you'd want to pass the --interactive param to docker. Looking at the puppet docker docs it sounds like you can add extra_parameters => ['--interactive'],
to your docker::run.
I removed detach => true and it worked. I don't understand the issue here. But anyway thanks
– Bikram
Nov 14 at 12:53
According to github.com/puppetlabs/puppetlabs-docker/issues/313 On an os using systemd you don't need the detatch => true param set. If you remove it the example you've provide will run without any issues.
– Bikram
Nov 14 at 13:01
add a comment |
up vote
0
down vote
The container lives for as long as the command you're running.
In your case it most likely runs a non-interactive call to bash successfully and exits with 0.
To keep the container running you'd want to pass the --interactive param to docker. Looking at the puppet docker docs it sounds like you can add extra_parameters => ['--interactive'],
to your docker::run.
I removed detach => true and it worked. I don't understand the issue here. But anyway thanks
– Bikram
Nov 14 at 12:53
According to github.com/puppetlabs/puppetlabs-docker/issues/313 On an os using systemd you don't need the detatch => true param set. If you remove it the example you've provide will run without any issues.
– Bikram
Nov 14 at 13:01
add a comment |
up vote
0
down vote
up vote
0
down vote
The container lives for as long as the command you're running.
In your case it most likely runs a non-interactive call to bash successfully and exits with 0.
To keep the container running you'd want to pass the --interactive param to docker. Looking at the puppet docker docs it sounds like you can add extra_parameters => ['--interactive'],
to your docker::run.
The container lives for as long as the command you're running.
In your case it most likely runs a non-interactive call to bash successfully and exits with 0.
To keep the container running you'd want to pass the --interactive param to docker. Looking at the puppet docker docs it sounds like you can add extra_parameters => ['--interactive'],
to your docker::run.
answered Nov 14 at 12:33
Stefan R
23115
23115
I removed detach => true and it worked. I don't understand the issue here. But anyway thanks
– Bikram
Nov 14 at 12:53
According to github.com/puppetlabs/puppetlabs-docker/issues/313 On an os using systemd you don't need the detatch => true param set. If you remove it the example you've provide will run without any issues.
– Bikram
Nov 14 at 13:01
add a comment |
I removed detach => true and it worked. I don't understand the issue here. But anyway thanks
– Bikram
Nov 14 at 12:53
According to github.com/puppetlabs/puppetlabs-docker/issues/313 On an os using systemd you don't need the detatch => true param set. If you remove it the example you've provide will run without any issues.
– Bikram
Nov 14 at 13:01
I removed detach => true and it worked. I don't understand the issue here. But anyway thanks
– Bikram
Nov 14 at 12:53
I removed detach => true and it worked. I don't understand the issue here. But anyway thanks
– Bikram
Nov 14 at 12:53
According to github.com/puppetlabs/puppetlabs-docker/issues/313 On an os using systemd you don't need the detatch => true param set. If you remove it the example you've provide will run without any issues.
– Bikram
Nov 14 at 13:01
According to github.com/puppetlabs/puppetlabs-docker/issues/313 On an os using systemd you don't need the detatch => true param set. If you remove it the example you've provide will run without any issues.
– Bikram
Nov 14 at 13:01
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53298920%2fpuppet-not-showing-docker-running-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
most likely you already have something listening on port 80 and this made the container die:
docker ps -a
on the host and see if the container did indeed exit– Uku Loskit
Nov 14 at 12:10
@UkuLoskit No, there is no any in docker ps -a. Also, port 80 is not used. when I try docker command it works
– Bikram
Nov 14 at 12:14
@Bikram, if you have found a solution yourself and would like to share it (thanks!) then the customary way to do so around here is to write and post an actual answer to the question. Editing the solution into the question is inconsistent with our model and conventions.
– John Bollinger
Nov 14 at 15:59