Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Docker Stack Deploy issue: ContainerSpec: image reference must be provided #1072

Closed
danielkhalilov opened this issue Jan 7, 2018 · 4 comments
Labels

Comments

@danielkhalilov
Copy link

Steps:
-Downloaded the latest unstable zenbot published today including Docker hotfixes (1/6/2018 22:00 EST)
-Ran "docker-compose build". Here are my images

zenbotunstable_server   latest              e27e89891907        23 minutes ago      894MB
node                    8                   b87c2ad8344d        3 days ago          676MB
mongo                   latest              1200574c8af9        10 days ago         366MB
mrvautin/adminmongo     latest              352119f77853        3 weeks ago         127MB

-Ran "sudo docker-compose up"
-Ran "docker stack deploy --compose-file docker-compose.yml zenbotunstable"

Here is the error:
Creating network zenbotunstable_default
Creating service zenbotunstable_mongodb
Creating service zenbotunstable_adminmongo
Creating service zenbotunstable_server
failed to create service zenbotunstable_server: Error response from daemon: rpc error: code = InvalidArgument desc = ContainerSpec: image reference must be provided

Seems like this error means that the image references may not be correct. however, the docker-compose.yml file reads mongo:latest and mrvautin/adminmongo, which matches my images.

Despite the above error, three containers were created (seen by running "docker ps")

CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS              PORTS                      NAMES
1ca3538950cf        zenbotunstable_server   "/usr/local/bin/no..."   33 minutes ago      Up 8 minutes                                   zenbotunstable_server_1
293e9caecf1a        mrvautin/adminmongo     "npm start"              33 minutes ago      Up 8 minutes        0.0.0.0:1234->1234/tcp     zenbotunstable_adminmongo_1
437e00728c4d        mongo:latest            "docker-entrypoint..."   33 minutes ago      Up 8 minutes        0.0.0.0:27017->27017/tcp   zenbotunstable_mongodb_1

(Not sure if Dockerfile is related to this, but when opening Dockerfile, this is what appears:)
Last login: Sat Jan 6 23:28:40 on ttys002
/Users/danielkhalilov/zenbot-unstable/Dockerfile ; exit;
MacBook-Pro:~ danielkhalilov$ /Users/danielkhalilov/zenbot-unstable/Dockerfile ; exit;
FROM: can't read /var/mail/node:8
/Users/danielkhalilov/zenbot-unstable/Dockerfile: line 3: RUN: command not found
/Users/danielkhalilov/zenbot-unstable/Dockerfile: line 4: WORKDIR: command not found
/Users/danielkhalilov/zenbot-unstable/Dockerfile: line 6: COPY: command not found
/Users/danielkhalilov/zenbot-unstable/Dockerfile: line 7: COPY: command not found
/Users/danielkhalilov/zenbot-unstable/Dockerfile: line 8: COPY: command not found
/Users/danielkhalilov/zenbot-unstable/Dockerfile: line 9: COPY: command not found
/Users/danielkhalilov/zenbot-unstable/Dockerfile: line 10: RUN: command not found
/Users/danielkhalilov/zenbot-unstable/Dockerfile: line 11: RUN: command not found
/Users/danielkhalilov/zenbot-unstable/Dockerfile: line 13: COPY: command not found
/Users/danielkhalilov/zenbot-unstable/Dockerfile: line 14: RUN: command not found
ENV: NODE_ENV: No such file or directory
/Users/danielkhalilov/zenbot-unstable/Dockerfile: line 18: ENTRYPOINT: command not found
/Users/danielkhalilov/zenbot-unstable/Dockerfile: line 19: CMD: command not found
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

I do not have much experience with Docker and struggling with cloud deployment. Is the above error an issue or should I proceed with deploying my containers as is?

@Shawn8901
Copy link
Contributor

What do you mean by opening the docker file? With an editor or a shell?
The Dockerfile describes what docker has to do (to set the container up) and is no shell script!

About the other point i am not able to help you, because i have no experience with dockers stack deployment

@DeviaVir
Copy link
Owner

DeviaVir commented Jan 7, 2018

The error pops up when you have a docker-compose.yml not specifying an image, we are however:
https://github.com/DeviaVir/zenbot/blob/unstable/docker-compose.yml#L6

so I'm not sure how to help you further.

@danielkhalilov
Copy link
Author

danielkhalilov commented Jan 7, 2018

Thank you very much @DeviaVir , worked like a charm. The docker-compose.yml i had was missing the Image image: deviavir/zenbot:unstable specified under Server: for whatever reason. This issue can be closed.

@DeviaVir
Copy link
Owner

Dear issue reporter,

We have slightly changed our github issue policy and would now kindly request folks that have questions that they ask them in our zenbot subreddit.

You can find it here: https://reddit.com/r/zenbot

This issue will be closed, but if you disagree with your ticket being marked as a question feel free to leave a comment defending your case.

Thanks for contributing time and effort!

Greetings,
🤖

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants