Why service not listed in docker-compose ps when its name gets changed?How to list containers in DockerHow to get a Docker container's IP address from the host?Docker-compose: node_modules not present in a volume after npm install succeedsHow do I get into a Docker container's shell?Docker Compose - Image nameLinks between containers not working with docker-compose version 2Docker compose, running containers in net:hostWhy docker-compose do not use port binding as expected?Getting Name of service not known with Redis [Error -2]Determining container name after running docker-compose up (Docker Desktop Version 2.0.0.0-win78)
Importance of the current postdoc advisor's letter in TT job search
How to give my students a straightedge instead of a ruler
Why does Kubuntu 19.04 show an update that apparently doesn't exist?
Why does '/' contain '..'?
Amortized Loans seem to benefit the bank more than the customer
Would it be unbalanced to increase a druid's number of uses of Wild Shape based on level?
What is the source of "You can achieve a lot with hate, but even more with love" (Shakespeare?)
Why does an orbit become hyperbolic when total orbital energy is positive?
How do we know that black holes are spinning?
Does a feasible high thrust high specific impulse engine exist using current non space technology?
What are the advantages and disadvantages of tail wheels that cause modern airplanes to not use them?
Is there any reason to concentrate on the Thunderous Smite spell after using its effects?
Why does the speed of sound decrease at high altitudes although the air density decreases?
Teleport everything in a large zone; or teleport all living things and make a lot of equipment disappear
Can I travel to European countries with the Irish passport and without destination Visa?
What does this line from The hobbit mean?
Is it appropriate to CC a lot of people on an email?
Bash awk command with quotes
Output a Super Mario Image
Why is it called a stateful and a stateless firewall?
Is the Dodge action perceptible to other characters?
What organs or modifications would be needed for a life biological creature not to require sleep?
Unable to find solution to 6 simultaneous equations
What is this gigantic dish at Ben Gurion airport?
Why service not listed in docker-compose ps when its name gets changed?
How to list containers in DockerHow to get a Docker container's IP address from the host?Docker-compose: node_modules not present in a volume after npm install succeedsHow do I get into a Docker container's shell?Docker Compose - Image nameLinks between containers not working with docker-compose version 2Docker compose, running containers in net:hostWhy docker-compose do not use port binding as expected?Getting Name of service not known with Redis [Error -2]Determining container name after running docker-compose up (Docker Desktop Version 2.0.0.0-win78)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Service won't be listed in docker-compose ps when service name changes in docker-compose file lets say from redis to redisabc like below. Additionally docker creates it as a container, it can be seen when docker ps executed.
I restarted docker desktop and also made reboot to machine nothing changed.
My docker-compose file version is 3.6
redisabc:
container_name: redis
image: redis
command: [ "redis-server", "--protected-mode", "no" ]
hostname: redis
restart: always
ports:
- 6379:6379
networks:
- backend
as you see there is no service called redisabc when typed docker-compose ps
but it stays as container (docker ps result)
and this is the way I create docker-compose file
If I change back the service name redisabc to redis once again everything works as expected
IMPORTANT EDIT: I tested everything with another computer and no problem is shown. I wonder is there any caching mechanism for services on docker that I can flush all? I'm really confused about what's going on.
docker docker-compose
add a comment
|
Service won't be listed in docker-compose ps when service name changes in docker-compose file lets say from redis to redisabc like below. Additionally docker creates it as a container, it can be seen when docker ps executed.
I restarted docker desktop and also made reboot to machine nothing changed.
My docker-compose file version is 3.6
redisabc:
container_name: redis
image: redis
command: [ "redis-server", "--protected-mode", "no" ]
hostname: redis
restart: always
ports:
- 6379:6379
networks:
- backend
as you see there is no service called redisabc when typed docker-compose ps
but it stays as container (docker ps result)
and this is the way I create docker-compose file
If I change back the service name redisabc to redis once again everything works as expected
IMPORTANT EDIT: I tested everything with another computer and no problem is shown. I wonder is there any caching mechanism for services on docker that I can flush all? I'm really confused about what's going on.
docker docker-compose
Would you be able to provide the specific commands that you are using as the output of such commands?
– Ikaro0
Mar 28 at 13:06
sure I edited the answer
– Mustafa Güven
Mar 28 at 13:32
Should you be using docker service ls instead docker-compose ps? maybe its a typo,
– Ikaro0
Mar 28 at 13:46
I did, docker service ls did not work, it says another thing: Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
– Mustafa Güven
Mar 28 at 13:52
add a comment
|
Service won't be listed in docker-compose ps when service name changes in docker-compose file lets say from redis to redisabc like below. Additionally docker creates it as a container, it can be seen when docker ps executed.
I restarted docker desktop and also made reboot to machine nothing changed.
My docker-compose file version is 3.6
redisabc:
container_name: redis
image: redis
command: [ "redis-server", "--protected-mode", "no" ]
hostname: redis
restart: always
ports:
- 6379:6379
networks:
- backend
as you see there is no service called redisabc when typed docker-compose ps
but it stays as container (docker ps result)
and this is the way I create docker-compose file
If I change back the service name redisabc to redis once again everything works as expected
IMPORTANT EDIT: I tested everything with another computer and no problem is shown. I wonder is there any caching mechanism for services on docker that I can flush all? I'm really confused about what's going on.
docker docker-compose
Service won't be listed in docker-compose ps when service name changes in docker-compose file lets say from redis to redisabc like below. Additionally docker creates it as a container, it can be seen when docker ps executed.
I restarted docker desktop and also made reboot to machine nothing changed.
My docker-compose file version is 3.6
redisabc:
container_name: redis
image: redis
command: [ "redis-server", "--protected-mode", "no" ]
hostname: redis
restart: always
ports:
- 6379:6379
networks:
- backend
as you see there is no service called redisabc when typed docker-compose ps
but it stays as container (docker ps result)
and this is the way I create docker-compose file
If I change back the service name redisabc to redis once again everything works as expected
IMPORTANT EDIT: I tested everything with another computer and no problem is shown. I wonder is there any caching mechanism for services on docker that I can flush all? I'm really confused about what's going on.
docker docker-compose
docker docker-compose
edited Mar 28 at 13:41
Mustafa Güven
asked Mar 28 at 12:29
Mustafa GüvenMustafa Güven
11.4k10 gold badges51 silver badges74 bronze badges
11.4k10 gold badges51 silver badges74 bronze badges
Would you be able to provide the specific commands that you are using as the output of such commands?
– Ikaro0
Mar 28 at 13:06
sure I edited the answer
– Mustafa Güven
Mar 28 at 13:32
Should you be using docker service ls instead docker-compose ps? maybe its a typo,
– Ikaro0
Mar 28 at 13:46
I did, docker service ls did not work, it says another thing: Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
– Mustafa Güven
Mar 28 at 13:52
add a comment
|
Would you be able to provide the specific commands that you are using as the output of such commands?
– Ikaro0
Mar 28 at 13:06
sure I edited the answer
– Mustafa Güven
Mar 28 at 13:32
Should you be using docker service ls instead docker-compose ps? maybe its a typo,
– Ikaro0
Mar 28 at 13:46
I did, docker service ls did not work, it says another thing: Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
– Mustafa Güven
Mar 28 at 13:52
Would you be able to provide the specific commands that you are using as the output of such commands?
– Ikaro0
Mar 28 at 13:06
Would you be able to provide the specific commands that you are using as the output of such commands?
– Ikaro0
Mar 28 at 13:06
sure I edited the answer
– Mustafa Güven
Mar 28 at 13:32
sure I edited the answer
– Mustafa Güven
Mar 28 at 13:32
Should you be using docker service ls instead docker-compose ps? maybe its a typo,
– Ikaro0
Mar 28 at 13:46
Should you be using docker service ls instead docker-compose ps? maybe its a typo,
– Ikaro0
Mar 28 at 13:46
I did, docker service ls did not work, it says another thing: Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
– Mustafa Güven
Mar 28 at 13:52
I did, docker service ls did not work, it says another thing: Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
– Mustafa Güven
Mar 28 at 13:52
add a comment
|
2 Answers
2
active
oldest
votes
I'll rewrite my answer cause I think I wasn't of much help.
Reviewing all the information I've replicated your setting at home with the following:
docker-compose.yml:
version: '3'
services:
redisabc:
image: "redis"
command: [ "redis-server", "--protected-mode", "no" ]
hostname: redis
restart: always
ports:
- 6379:6379
Then I started it:
# docker-compose up
Creating docker_redisabc_1 ... done
Attaching to docker_redisabc_1
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=1, just started
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # Configuration loaded
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 * Running mode=standalone, port=6379.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # Server initialized
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 * Ready to accept connections
The output from ps:
# docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------
docker_redisabc_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
The service name it's been used.
My concern is not related to having swarm at this point. Docker compose does not create service if I change the service name as I explained above, it is enormously ridiculous but what happens right now is this
– Mustafa Güven
Mar 28 at 20:23
I've tried to replicate your problem but it looks to be working properly.
– Ikaro0
Mar 28 at 21:32
same here, I have tried it also on another machine and it works. I'm gonna remove docker desktop and reinstall again
– Mustafa Güven
Mar 29 at 6:24
add a comment
|
I've found the exact incident after trying almost everything (lots of things from docker system prune --volumes to uninstalling docker machine etc)
I had 2 different docker files named base-docker-compose.yml and docker-compose.yml. During the service creation I was calling docker-compose through base-docker-compose.yml file. Having created services I was doing docker-compose ps without base-docker-compose.yml file although base-docker-compose.yml is used while execution. Then I was doing docker-compose ps to list the whole up services. This was the mistake I made, I had to docker-compose -f base-docker-compose.yml ps.
add a comment
|
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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%2f55397688%2fwhy-service-not-listed-in-docker-compose-ps-when-its-name-gets-changed%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I'll rewrite my answer cause I think I wasn't of much help.
Reviewing all the information I've replicated your setting at home with the following:
docker-compose.yml:
version: '3'
services:
redisabc:
image: "redis"
command: [ "redis-server", "--protected-mode", "no" ]
hostname: redis
restart: always
ports:
- 6379:6379
Then I started it:
# docker-compose up
Creating docker_redisabc_1 ... done
Attaching to docker_redisabc_1
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=1, just started
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # Configuration loaded
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 * Running mode=standalone, port=6379.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # Server initialized
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 * Ready to accept connections
The output from ps:
# docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------
docker_redisabc_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
The service name it's been used.
My concern is not related to having swarm at this point. Docker compose does not create service if I change the service name as I explained above, it is enormously ridiculous but what happens right now is this
– Mustafa Güven
Mar 28 at 20:23
I've tried to replicate your problem but it looks to be working properly.
– Ikaro0
Mar 28 at 21:32
same here, I have tried it also on another machine and it works. I'm gonna remove docker desktop and reinstall again
– Mustafa Güven
Mar 29 at 6:24
add a comment
|
I'll rewrite my answer cause I think I wasn't of much help.
Reviewing all the information I've replicated your setting at home with the following:
docker-compose.yml:
version: '3'
services:
redisabc:
image: "redis"
command: [ "redis-server", "--protected-mode", "no" ]
hostname: redis
restart: always
ports:
- 6379:6379
Then I started it:
# docker-compose up
Creating docker_redisabc_1 ... done
Attaching to docker_redisabc_1
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=1, just started
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # Configuration loaded
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 * Running mode=standalone, port=6379.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # Server initialized
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 * Ready to accept connections
The output from ps:
# docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------
docker_redisabc_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
The service name it's been used.
My concern is not related to having swarm at this point. Docker compose does not create service if I change the service name as I explained above, it is enormously ridiculous but what happens right now is this
– Mustafa Güven
Mar 28 at 20:23
I've tried to replicate your problem but it looks to be working properly.
– Ikaro0
Mar 28 at 21:32
same here, I have tried it also on another machine and it works. I'm gonna remove docker desktop and reinstall again
– Mustafa Güven
Mar 29 at 6:24
add a comment
|
I'll rewrite my answer cause I think I wasn't of much help.
Reviewing all the information I've replicated your setting at home with the following:
docker-compose.yml:
version: '3'
services:
redisabc:
image: "redis"
command: [ "redis-server", "--protected-mode", "no" ]
hostname: redis
restart: always
ports:
- 6379:6379
Then I started it:
# docker-compose up
Creating docker_redisabc_1 ... done
Attaching to docker_redisabc_1
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=1, just started
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # Configuration loaded
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 * Running mode=standalone, port=6379.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # Server initialized
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 * Ready to accept connections
The output from ps:
# docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------
docker_redisabc_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
The service name it's been used.
I'll rewrite my answer cause I think I wasn't of much help.
Reviewing all the information I've replicated your setting at home with the following:
docker-compose.yml:
version: '3'
services:
redisabc:
image: "redis"
command: [ "redis-server", "--protected-mode", "no" ]
hostname: redis
restart: always
ports:
- 6379:6379
Then I started it:
# docker-compose up
Creating docker_redisabc_1 ... done
Attaching to docker_redisabc_1
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=1, just started
redisabc_1 | 1:C 28 Mar 2019 21:23:43.775 # Configuration loaded
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 * Running mode=standalone, port=6379.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # Server initialized
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redisabc_1 | 1:M 28 Mar 2019 21:23:43.776 * Ready to accept connections
The output from ps:
# docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------
docker_redisabc_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
The service name it's been used.
edited Mar 28 at 21:27
answered Mar 28 at 14:05
Ikaro0Ikaro0
3301 silver badge11 bronze badges
3301 silver badge11 bronze badges
My concern is not related to having swarm at this point. Docker compose does not create service if I change the service name as I explained above, it is enormously ridiculous but what happens right now is this
– Mustafa Güven
Mar 28 at 20:23
I've tried to replicate your problem but it looks to be working properly.
– Ikaro0
Mar 28 at 21:32
same here, I have tried it also on another machine and it works. I'm gonna remove docker desktop and reinstall again
– Mustafa Güven
Mar 29 at 6:24
add a comment
|
My concern is not related to having swarm at this point. Docker compose does not create service if I change the service name as I explained above, it is enormously ridiculous but what happens right now is this
– Mustafa Güven
Mar 28 at 20:23
I've tried to replicate your problem but it looks to be working properly.
– Ikaro0
Mar 28 at 21:32
same here, I have tried it also on another machine and it works. I'm gonna remove docker desktop and reinstall again
– Mustafa Güven
Mar 29 at 6:24
My concern is not related to having swarm at this point. Docker compose does not create service if I change the service name as I explained above, it is enormously ridiculous but what happens right now is this
– Mustafa Güven
Mar 28 at 20:23
My concern is not related to having swarm at this point. Docker compose does not create service if I change the service name as I explained above, it is enormously ridiculous but what happens right now is this
– Mustafa Güven
Mar 28 at 20:23
I've tried to replicate your problem but it looks to be working properly.
– Ikaro0
Mar 28 at 21:32
I've tried to replicate your problem but it looks to be working properly.
– Ikaro0
Mar 28 at 21:32
same here, I have tried it also on another machine and it works. I'm gonna remove docker desktop and reinstall again
– Mustafa Güven
Mar 29 at 6:24
same here, I have tried it also on another machine and it works. I'm gonna remove docker desktop and reinstall again
– Mustafa Güven
Mar 29 at 6:24
add a comment
|
I've found the exact incident after trying almost everything (lots of things from docker system prune --volumes to uninstalling docker machine etc)
I had 2 different docker files named base-docker-compose.yml and docker-compose.yml. During the service creation I was calling docker-compose through base-docker-compose.yml file. Having created services I was doing docker-compose ps without base-docker-compose.yml file although base-docker-compose.yml is used while execution. Then I was doing docker-compose ps to list the whole up services. This was the mistake I made, I had to docker-compose -f base-docker-compose.yml ps.
add a comment
|
I've found the exact incident after trying almost everything (lots of things from docker system prune --volumes to uninstalling docker machine etc)
I had 2 different docker files named base-docker-compose.yml and docker-compose.yml. During the service creation I was calling docker-compose through base-docker-compose.yml file. Having created services I was doing docker-compose ps without base-docker-compose.yml file although base-docker-compose.yml is used while execution. Then I was doing docker-compose ps to list the whole up services. This was the mistake I made, I had to docker-compose -f base-docker-compose.yml ps.
add a comment
|
I've found the exact incident after trying almost everything (lots of things from docker system prune --volumes to uninstalling docker machine etc)
I had 2 different docker files named base-docker-compose.yml and docker-compose.yml. During the service creation I was calling docker-compose through base-docker-compose.yml file. Having created services I was doing docker-compose ps without base-docker-compose.yml file although base-docker-compose.yml is used while execution. Then I was doing docker-compose ps to list the whole up services. This was the mistake I made, I had to docker-compose -f base-docker-compose.yml ps.
I've found the exact incident after trying almost everything (lots of things from docker system prune --volumes to uninstalling docker machine etc)
I had 2 different docker files named base-docker-compose.yml and docker-compose.yml. During the service creation I was calling docker-compose through base-docker-compose.yml file. Having created services I was doing docker-compose ps without base-docker-compose.yml file although base-docker-compose.yml is used while execution. Then I was doing docker-compose ps to list the whole up services. This was the mistake I made, I had to docker-compose -f base-docker-compose.yml ps.
answered Apr 2 at 8:09
Mustafa GüvenMustafa Güven
11.4k10 gold badges51 silver badges74 bronze badges
11.4k10 gold badges51 silver badges74 bronze badges
add a comment
|
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.
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%2f55397688%2fwhy-service-not-listed-in-docker-compose-ps-when-its-name-gets-changed%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
Would you be able to provide the specific commands that you are using as the output of such commands?
– Ikaro0
Mar 28 at 13:06
sure I edited the answer
– Mustafa Güven
Mar 28 at 13:32
Should you be using docker service ls instead docker-compose ps? maybe its a typo,
– Ikaro0
Mar 28 at 13:46
I did, docker service ls did not work, it says another thing: Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
– Mustafa Güven
Mar 28 at 13:52